I’m writing an editor script that allows the designer to select certain properties of certain GOs at design time, and then a related script will save those properties to disk, and then be able to read them back in on a separate run.
The problem I’m seeing is that saving to disk and restoring later depends on being able to match a saved chunk of data with the correct run-time object. So I need to know if there’s any way to uniquely identify a GO and/or its components in a manner that transcends both design-time (when the designer selects them for saving) and run-time, without requiring the designer to faithfully supply a unique “name” value for each object to be saved (not a reliable solution).
I see that instanceID is not dependable between runs, much less after editing. But since Unity can match a GO at design-time to a GO at run-time, there’s got to be a way.