UnityEditorInternal









How do I use Unity Editor Internal
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: SortingLayerExposedEditor.cs Copy
103     public static string[] GetSortingLayerNames()
104     {
105         Type internalEditorUtilityType = typeof(UnityEditorInternal.InternalEditorUtility);
106         PropertyInfo sortingLayersProperty = internalEditorUtilityType.GetProperty("sortingLayerNames", BindingFlags.Static | BindingFlags.NonPublic);
107         return (string[])sortingLayersProperty.GetValue(null, new object[0]);
108     }
File name: SortingLayerExposedEditor.cs Copy
111     public int[] GetSortingLayerUniqueIDs()
112     {
113         Type internalEditorUtilityType = typeof(UnityEditorInternal.InternalEditorUtility);
114         PropertyInfo sortingLayerUniqueIDsProperty = internalEditorUtilityType.GetProperty("sortingLayerUniqueIDs", BindingFlags.Static | BindingFlags.NonPublic);
115         return (int[])sortingLayerUniqueIDsProperty.GetValue(null, new object[0]);
116     }

UnityEditorInternal 156 lượt xem

Gõ tìm kiếm nhanh...