Hello,
Is there anyway or workaround to save and load game object with multiple same type components?
Multiple same type components
Re: Multiple same type components
Hi there,
In this case you would need to save the Components separately and assign the appropriate data to the appropriate Component using ES3.LoadInto. I.e.
All the best,
Joel
In this case you would need to save the Components separately and assign the appropriate data to the appropriate Component using ES3.LoadInto. I.e.
Code: Select all
ES3.Save("components", gameObject.GetComponents<MyScript>());
ES3.LoadInto("components", gameObject.GetComponents<MyScript>());
Joel
Re: Multiple same type components
Hi Joel,
Thanks for quick response! I think I can come up with a solution using LoadInto. In the attached image you can see a thing I'm trying to save. Two physics objects are connected with Joints, those joints are added by player during playtime, and they do not exist in the prefab. Joint must be on the same game object, because they depends on rigidbody. So I probably should add these joint components to the object before I load into them. This is probably only way to do it?
Thanks for quick response! I think I can come up with a solution using LoadInto. In the attached image you can see a thing I'm trying to save. Two physics objects are connected with Joints, those joints are added by player during playtime, and they do not exist in the prefab. Joint must be on the same game object, because they depends on rigidbody. So I probably should add these joint components to the object before I load into them. This is probably only way to do it?
Re: Multiple same type components
From what I can tell this would be the best way of doing it.
All the best,
Joel
All the best,
Joel
Re: Multiple same type components
OK, thank you!