I don’t want to change it but see if it’s active
if (GOs.gameObject.active){}
the warning I get for it
Assets/Scripts/CreateFloor.cs(263,44): warning CS0618: `UnityEngine.GameObject.active' is obsolete: `GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.'
why because of my pool
and if I disable disabled object than it get’s wrong and it may send an active GO to the wrong place and it could look like there’s deleted GO but instead it’s not
so any else way to compare if GO is active?
ok thanks it works what exactly means obsolete? and wooooow my performance went down aloooot when I change only in to activeInHierarchy
– sdgdObsolete can be considered to be equivalent to outdated. When a function is deemed obsolete, usually it will be replaced by newer/different function(s) that can do the same thing. For
– Chronos-LgameObject.active, it is a getter/setter. The setter is replaced bygameObject.SetActive(); while the getter is replaced by 2 getters: [activeInHierarchy][1] and [activeSelf][2]. [1]: http://docs.unity3d.com/Documentation/ScriptReference/GameObject-activeInHierarchy.html [2]: http://docs.unity3d.com/Documentation/ScriptReference/GameObject-activeSelf.htmlgr8 thanks now I know why performance droped I used activeself after I read this 2 articles you provided and it's parents are allways active anyway so for few 100 in few seconds that's huge difference
– sdgdOh! So helpful, thanks!
– Shippety