Apologies for posting this thread: my technical ability just isn't sufficient to figure out a solution on my own
I'm using another Unity asset called Curvy Spline - it's a nice little system for drawing splines in the game world (among other things). Everything works fine most of the time, except when I I load a saved game I get a flood of errors in the console:
MissingReferenceException: The object of type 'CurvySplineSegment' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
FluffyUnderware.DevTools.ComponentPool.destroy (UnityEngine.Component item) (at Assets/Packages/DevTools/Components/ComponentPool.cs:222)
FluffyUnderware.DevTools.ComponentPool.Update () (at Assets/Packages/DevTools/Components/ComponentPool.cs:112)
Some more info:
- This only happens when I load a game from within the same scene (i.e.: I use two scenes: the game world and the main menu. If I load a game from the main menu, I don't get this error).
- I'm using load scenes with asynchronous loading.
- I have the option set to always reload the scene when loading a game. (I need to keep this enabled, otherwise I get weird errors from another asset).
Thanks in advance for any assistance!
Comments
There are two related events: OnBeforeLoading and OnFinishLoading. I don't know which one you'd need, but between them you should be able to do whatever workaround is needed at the time you load the save.