Willing to make an image invisible to show other gameobjects behind it, but it has co-routine on script which wont run if it's inactive. Now I am making it inactive (with methode setActive(false)) to make it invisible based on events. So I want to run the coroutine and also make it invisible.
Is setting order in hierarchy a solution for this?
How to make it invisible without making it inactive/How can I achieve this and make coroutine running?
You can do this by turning off the Renderer of the GameObject.
To disable:
gameObject.GetComponent<Renderer>().enabled = false;
Ref: https://docs.unity3d.com/ScriptReference/Renderer-enabled.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With