Hi guys,
first of all: this is my first post in these forums, so be patient ![]()
I have been using unity for a while now. Besides the great scripting support during runtime I discovered the great features of editor scripting, lately.
Now I have one very urgent question. When doing this:
Object prefab = AssetDatabase.LoadAssetAtPath(newPrefabPath, typeof(GameObject));
GameObject clone = GameObject.Instantiate(prefab) as GameObject;
I can’t do:
EditorUtility.ReconnectToLastPrefab(clone);
And I can’t do:
EditorUtility.GetPrefabParent(clone);
Problem is, I have lots of scene objects (gameobjects) that are not prefabbed. I can create prefabs and I can instantiate (off thess prefabs) new gameobjects in place. But then these are not connected to their prefab.
How can I Instantiate a Prefab and Reconnect the resulting Object to this Prefab?