DontDestroyOnLoad - how to destroy?

让人想犯罪 __ 提交于 2019-12-11 15:22:14

问题


I'm working on a Vuforia (legacy) application.

In "Play" mode in Unity I can see that some "DontDestroyOnLoad" content is being generated, (looks like it's sort of a camera).

This might be a reason of why I have some problems when switching between the scenes, so the question is how to make these elements "destroyable"?


回答1:


'DontDestroyOnLoad' It means that they won't manage it automatically. so if you want to destroy it, you should destroy manually like

GameObject.Destroy(GameObject.Find("TextureBufferCamera"));



来源:https://stackoverflow.com/questions/46919796/dontdestroyonload-how-to-destroy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!