Hey,
I'd like to save whether or not game objects are enabled or disabled. I've asked a similar question in the past but this is more specific
I know I can save it via the Remember Animator
https://i.imgur.com/jNd6mYs.png
Although I find this way a little convoluted, is there a way to do this with a script in AC that I've missed, or will I be able to do this with a custom script?
Here is an example
https://i.imgur.com/LMWKqJF.png
I'd like to disable this object, and record its enabled or disabled state
I imagine all it would need is a remember component on
ArrowMessAfterDreamSequence
that would record the enabled state of
ArrowsEnabled
I know this can be done with remember visibility and remember collider too. However there are some circumstances I need to disable objects which have custom scripts running on them.
Thanks for your help.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I'd advise caution when recording the enabled state of objects, but if you're going to do it - then storing the data on another object would certainly be the way to go.
RememberEnabledState.cs:
And the Editor class, RememberEnabledState.cs (place this in an Editor subfolder):
Awesome thank you so much!
Why do you caution not to do it out of curiosity? What issue would I be facing?
A disabled GameObject can cease to become "findable" in some cases, but in the end it really comes down to how extensively you use the object elsewhere. My suggestion would be to just try it and see.