Let’s say some script that has many variables which can be manipulate in Inspector pane.
So, if I want to keep that settings when go into other scene,
How can I keep them?
I already attach it to main character and I can’t use DontDestroyOnLoad because this method destroy character’s mesh.
So I think PlayerPrefs but this also need huge work of making much variables (stats, level, skill’s various variables, it over hundreds)
And I can’t make whole of them as static variable because then, I can’t manipulate them in Inspector.
So, now I think as a alternative way, make a empty gameobject(say, A) and attach those script of variables, and manipulate in one scene, and if I go to another scene, only write DontDestroyOnLoad to that A, and copy A’s inspector’s variables to main character’s same script, or attach copy script.
There isn’t a built-in way to copy component parameters and paste them somewhere else but you can write an editor script to do this for specific types. See the CopyTransform script on the Unify wiki for a good example of how to go about this.