Unity报错 GameObject is already being activated or deactivated

Posted 吃斤欢乐豆

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unity报错 GameObject is already being activated or deactivated相关的知识,希望对你有一定的参考价值。

unity 在OnDisable 方法里设置父节点会报这个错。

   void OnDisable()
    {
//         transform.parent = oldParent;
        transform.SetParent(oldParent);
    }

 

以上是关于Unity报错 GameObject is already being activated or deactivated的主要内容,如果未能解决你的问题,请参考以下文章

Unity报错之UnityException: Texture ‘XXX‘ is not readable

Unity报错之UnityException: Texture ‘XXX‘ is not readable

Unity-报错解决error CS0619: ‘XRDevice.isPresent‘ is obsolete

图解unity下gameobject和transform的区别和关联

unity基础(GameObject transform)

Mac报错✨Unity IOS打包包错:LocationService class is used but Locations Usage Description is empty.