Just on and off states. I have various particle effects in my scene, but it is uneconomical to have them running at all time, so I trigger them to turn on with the switch when the player approaches them. Then turn off when they are out of sight again.
For them to load with the correct state I'm having to use Bools to track if they are on or off and triggering them as such through OnLoad. Remember Components would streamline this process a lot.
I don't have many particle effects in my current project, but could imagine this becoming a nightmare to keep track of in a more complex scene.
I haven't tested this but will save it for my next project since I've already setup the variables to remember if particle switches are on or off and with my deadline fast approaching I have no reason so change them for the script. This will be useful in the future though I am sure.
Comments
Perhaps. What status specifically are you looking to save? It's on/off state, or e.g. how long it's been on for?
Screenshots for context would be a big help.
Just on and off states. I have various particle effects in my scene, but it is uneconomical to have them running at all time, so I trigger them to turn on with the switch when the player approaches them. Then turn off when they are out of sight again.
For them to load with the correct state I'm having to use Bools to track if they are on or off and triggering them as such through OnLoad. Remember Components would streamline this process a lot.
I don't have many particle effects in my current project, but could imagine this becoming a nightmare to keep track of in a more complex scene.
Try this:
Thank you.
I haven't tested this but will save it for my next project since I've already setup the variables to remember if particle switches are on or off and with my deadline fast approaching I have no reason so change them for the script. This will be useful in the future though I am sure.
Could be useful,thanks Chris!