- Home /
Serializable types for ScriptableObject
Is it not possible for System.Object and System.Int64 to be serialized via ScriptableObject? I expected both of these types to work. However, they both are default values when I instantiate the asset. If I temporarily change both types to Int32 in my code, everything works as expected.
Answer by Tetrad · Jun 11, 2010 at 11:20 PM
This kind of question comes up all the time. The list of serializable types that Unity supports are in this answer:
I did a search and could not find this post :( It should be tagged a little differently to make it easier to find. Even more this information should really be in the Unity documentation. Right now the scriptable-object page doesn't have any info at all. If that list was on the page, I wouldn't have needed to ask.
Apart the link not working anymore, serializable types seem to differ if you're placing them in a serialized $$anonymous$$onoBehaviour or in a ScriptableObject. For example, a List (of any type, even floats) is correctly serialized in a $$anonymous$$onoBehaviour, but not in a ScriptableObject.
Answer by chuckrussell · Apr 12, 2012 at 05:51 PM
Sorry to revive an old thread, but have you found a way to serialize System.Object via ScriptableObject?
Your answer
Follow this Question
Related Questions
Custom assets give Missing (Mono Script) 0 Answers
ScriptableObject stored in MonoBehaviour lost on quit 1 Answer
Difference between assigning a value in inspector and with a custom editor script 1 Answer
How should I serialize data that is also editable in the Inspector? 2 Answers
please help me, Scriptable object's variable serialization issue 1 Answer