GetPrefabParent
How do I use Get Prefab Parent
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
345 | private static GameObject GetPrefabParent(GameObject mp) | 1 |
File name: PhotonViewInspector.cs
Copy
345 private static GameObject GetPrefabParent(GameObject mp)
346 {
347 #if UNITY_2_6_1 || UNITY_2_6 || UNITY_3_0 || UNITY_3_0_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4
348 // Unity 3.4 and older use EditorUtility
349 return (EditorUtility.GetPrefabParent(mp) as GameObject);
350 #else
351 // Unity 3.5 uses PrefabUtility
352 return PrefabUtility.GetPrefabParent(mp) as GameObject;
353 #endif
354 }
GetPrefabParent 138 lượt xem
Gõ tìm kiếm nhanh...