Question by
jukka-tamminen · Jun 29, 2018 at 08:52 AM ·
serializationcomponentloadingjsonsaving
Setting components variables with another component
I am creating saving system for my project, i am using prefabs for creating objects in scene and i save important data for that object in my custom class that is in said object.
my question is how can i set all variables in my data class named "ObjectData" by another ObjectData class?
In my saving system i save in Json all ObjectData classes in scene that are located in every gameobject that i want to save and in my loading system i instantiate then using prefab name from ObjectData class.
I would like and a method or a way to replace ObjectData class after instantiating. Or method to replace data in ObjectData by another ObjectData.
And sorry for messy explaining, english is not my strongest language :D
Comment