Prefab Apply C# (Code Help Please)

Hi friends,

“Prefab Apply” > C# As code, how can we do it?

public GameObject prefab; <--- Created.
Debug.Log(prefab); <--- Tested.

How can that be more? To save.

English is a bit poor. Sorry about that.

If I understand you correctly, this is only possible with editor scripts:

Frankly, don’t understand from this. Mixed. Do not have an easier way? or project?

Unfortunately there is no easier way if this is actually what you want to achieve.

Solution ;

public GameObject prefab;

PrefabUtility.ReplacePrefab(prefab, PrefabUtility.GetPrefabParent(prefab), ReplacePrefabOptions.ConnectToPrefab);

http://forum.unity3d.com/threads/207311-Prefab-Apply-quot-Material-quot?p=1398630#post1398630

Once more: It is not necessary to start more than one thread for the same topic.

Further, the actual implementation ideas are all covered within the answer link I posted.

Subject was gone. Therefore, the new opened. I’m sorry. There is another problem. Therein, there is another problem.