浏览代码

prevent OnCreate() function from activating in edit mode

/main
Steven Leal 4 年前
当前提交
6b27f7e5
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5
      com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs

5
com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs


$"Two Randomizers of the same type ({randomizerType.Name}) cannot both be active simultaneously");
var newRandomizer = (Randomizer)Activator.CreateInstance(randomizerType);
m_Randomizers.Add(newRandomizer);
#if UNITY_EDITOR
if (Application.isPlaying)
newRandomizer.Create();
#else
#endif
return newRandomizer;
}

正在加载...
取消
保存