how to know if GameObject is active without getting warning?

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?

Source

GameObject.active is obsolete now. You can use GameObject.activeInHierarchy to check if the gameObject is active in the scene.

I think you can also use GameObject.activeSelf which I imagine would be faster, but it only checks that specific object and won’t necessarily return false if the parent is disabled.

Reference: Unity - Scripting API: GameObject.activeSelf