Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
484 views
in Technique[技术] by (71.8m points)

c# - Unity Warning: Ignoring depth surface load action as it is memoryless

I am getting 2 warnings in Unity when trying to make screenshot:

Ignoring depth surface load action as it is memoryless
Ignoring depth surface store action as it is memoryless

I have found this thread but it is referencing to Unity Remote which I am not using.

Basic code to reproduce the warning:

public class test : MonoBehaviour
{
   // Start is called before the first frame update
  void Start()
  {
    StartCoroutine(TakeScreenshotUI());
  }

  public IEnumerator TakeScreenshotUI()
  {
    yield return new WaitForEndOfFrame();
    var tex = ScreenCapture.CaptureScreenshotAsTexture();
  }
}

I am getting same warnings in Unity 2019.2 and 2020.1.2.

Can someone help me figure out what the problem is?

UPDATE: warning is appearing only on MacOS with Metal Graphic API

question from:https://stackoverflow.com/questions/66062201/unity-warning-ignoring-depth-surface-load-action-as-it-is-memoryless

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Unity spits out a lot of warnings. I would just ignore them if your code is working.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...