Search found 3 matches
- Fri Dec 03, 2021 6:42 pm
- Forum: General Discussion
- Topic: How to save Scriptable Object as value, not by reference?
- Replies: 10
- Views: 2371
Re: How to save Scriptable Object as value, not by reference?
Yeay! It worked! I searched for t:MyScriptableObject in the project and right clicked->Add References(s) to the ES3 Reference Mgr (Script), which is attached as a persistent gameobject in the bootstrap scene.. Seems so obvious now, but I didn't know where to look. Thank you so much for your help :D ...
- Fri Dec 03, 2021 6:04 pm
- Forum: General Discussion
- Topic: How to save Scriptable Object as value, not by reference?
- Replies: 10
- Views: 2371
Re: How to save Scriptable Object as value, not by reference?
Oh, I see. Neither the GameObject nor the Sprite are generated at runtime. They all contain asset data, and I made sure of it using Odin Inspector's [AssetOnly] attribute. Also, looks like my method does not have a reference to these objects in my scenes prior to runtime. Okay, so they are: Not gene...
- Fri Dec 03, 2021 2:45 am
- Forum: General Discussion
- Topic: How to save Scriptable Object as value, not by reference?
- Replies: 10
- Views: 2371
How to save Scriptable Object as value, not by reference?
Hi, I was having an issue with saving and loading Scriptable Objects of my projects. My scriptable objects have something like: public class MyScriptableObject : ScriptableObject { string itemName; Sprite itemImage; GameObject prefab; float damage; float cost; } of these, string and float appear jus...