FindPrefabRoot() private method

private FindPrefabRoot ( GameObject source ) : GameObject
source UnityEngine.GameObject
return UnityEngine.GameObject
示例#1
0
文件: Util.cs 项目: oms064/GGJ2018
 /// <summary>
 /// Determine whether the object is part of a prefab, and if it is the root of the prefab tree
 /// </summary>
 /// <param name="g"></param>
 /// <returns></returns>
 public static bool IsPrefabParent(GameObject g)
 {
     return(PrefabUtility.FindPrefabRoot(g) == g);
 }