[英]How to fix Scene Management unity problem?
SceneManagement场景管理
There is suddenly a problem here, I don't know why.这里突然出现问题,不知道为什么。 the code was working in the past but now it don't
该代码过去可以工作,但现在不行
It happened when I updated hub它发生在我更新集线器时
I think its because it is not receiving the unityengine.sceneManagement liprary我认为是因为它没有收到 unityengine.sceneManagement liprary
I tried everything I tried fixing spelling but, nothing works should i update Visual Studio我尝试了我尝试修复拼写的所有方法,但是我应该更新 Visual Studio 没有任何效果
You probably already have a class called SceneManager, so if a scripts name is called that or anything thats the problem, delate or rename that script.您可能已经有一个名为 SceneManager 的 class,因此如果脚本名称被称为该脚本名称或任何问题,请删除或重命名该脚本。 If there is no script with the same name, than try using the full name, replace load scene line with this
UnityEngine.SceneManagement.SceneManager.LoadScene();
如果没有同名脚本,不如尝试使用全名,将加载场景行替换为这个
UnityEngine.SceneManagement.SceneManager.LoadScene();
and for what goes inside the parentheses I am not entirly sure, try doing UnityEngine.SceneManagement.SceneManager.GetActiveScene().name
if that doesn't work maybe try the original.对于括号内的内容,我不确定,如果不起作用,请尝试执行
UnityEngine.SceneManagement.SceneManager.GetActiveScene().name
可能尝试原始操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.