![](/img/trans.png)
[英]In Unity, is Awake() called before the game starts or before the scene starts?
[英]Unity - If scene name starts with
我想知道是否有一种方法可以检查当前场景是否以“ 3”开头。 我有几种具有自己场景的游戏模式。 游戏模式1场景以“ 1”开头。 (例如1.1、1.2、1.3)。 现在,我想通过说if(CurrentScene starts with "3.")
来检查场景是否正在使用游戏模式3。 我应该怎么做?
if( SceneManager.GetActiveScene().name.StartsWith("3.") )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.