bool isAny = PrefabUtility.IsAnyPrefabInstanceRoot(node);
bool isAdded = PrefabUtility.IsAddedGameObjectOverride(node);
GameObject or = PrefabUtility.GetOutermostPrefabInstanceRoot(node);
GameObject nr = PrefabUtility.GetNearestPrefabInstanceRoot(node);
返回值记录:
isAny | isAdded | or | nr | |
prefab_oriVariant | True | False | prefab_oriVariant | prefab_oriVariant |
ori_cube | False | False | prefab_oriVariant | prefab_oriVariant |
var_Cube | False | True | null | null |
prefab_ori2 | True | True | prefab_ori2 | prefab_ori2 |
ori2_Capsule | False | False | prefab_ori2 | prefab_ori2 |
var_Sphere | False | True | null | null |