Hi Guys.
I use “smallObject” for store something from project.
public class checkResource : MonoBehaviour {
public UnityEngine.Object smallObject;
public string fileName = "Id.xml";
}
I want to save a snapshot of this gameObject state.
I save public unityengine.object Id to XML:
" <resourceId>9230</resourceId>"
When I need to recover state, I load Id form xml and take object by his ID:
((checkResource)target).smallObject = EditorUtility.InstanceIDToObject(result.resourceId);
Can I’ll be sure, that IDs in project will stay as constant.
Thank you.