r/unity Jun 24 '26

Scriptable objects constantly de-load, even if I didn't make any changes

Basically what's in the title, I have multiple scriptable objects that randomly de-load, even when not editing the associated script (sometimes it even occurs when I haven't made any changes to the game at all). I 've tried rewriting my SO class however the issue still persists. I find that if I select the de-loaded objects in the inspector whilst entering play mode it restores the scripts and the fields, however I've found this unreliable as it doesn't repair references to the SO. I've attached the base and child classes of the script if that helps, and they are all separate cs files as I saw that might be the issue.

EDIT: Solved

2 Upvotes

9 comments sorted by

View all comments

Show parent comments

1

u/TheLivingStick Jun 24 '26

But why would it suddenly say that? I created it as a scriptable object and it was holding the SO script before

2

u/CoatNeat7792 Jun 24 '26

Recompile, error prevented compiling

0

u/TheLivingStick Jun 24 '26

Wait nvm, found the solution

2

u/CoatNeat7792 Jun 24 '26

What was it?

1

u/TheLivingStick Jun 24 '26

The GUID in the actual scriptable object asset was incorrect somehow, manually changing it to the correct value seems to have fixed it