diff options
author | chai <chaifix@163.com> | 2020-10-13 10:33:05 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-13 10:33:05 +0800 |
commit | fc6de82e75310b4c007d80753a5f58e6692f4855 (patch) | |
tree | e6d8d9226595a6727d43f18a218f53533101a4e0 /Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/EditorVersionCompatibilityUtility.cs | |
parent | 8cd16fb71177bb61a9475284d944bc6aba30740e (diff) |
+misc
Diffstat (limited to 'Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/EditorVersionCompatibilityUtility.cs')
-rw-r--r-- | Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/EditorVersionCompatibilityUtility.cs | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/EditorVersionCompatibilityUtility.cs b/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/EditorVersionCompatibilityUtility.cs index 318bd59e..567b7a0e 100644 --- a/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/EditorVersionCompatibilityUtility.cs +++ b/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/EditorVersionCompatibilityUtility.cs @@ -1,67 +1,67 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using UnityEditor.Compilation; -#if UNITY_2018_3_OR_NEWER -using UnityEditor.Experimental.SceneManagement; -#endif - -namespace UMotionEditor -{ - public static class EditorVersionCompatibilityUtility - { - //******************************************************************************** - // Public Properties - //******************************************************************************** - - //******************************************************************************** - // Private Properties - //******************************************************************************** - - //---------------------- - // Inspector - //---------------------- - - //---------------------- - // Internal - //---------------------- - - //******************************************************************************** - // Public Methods - //******************************************************************************** - - public static bool IsModelPrefab(GameObject gameObject) - { - #if UNITY_2018_3_OR_NEWER - return (PrefabUtility.GetPrefabAssetType(gameObject) == PrefabAssetType.Model); - #else - return (PrefabUtility.GetPrefabType(gameObject) == PrefabType.ModelPrefab); - #endif - } - - public static bool IsPrefab(GameObject gameObject) - { - #if UNITY_2018_3_OR_NEWER - return (PrefabUtility.GetPrefabAssetType(gameObject) != PrefabAssetType.NotAPrefab); - #else - return (PrefabUtility.GetPrefabType(gameObject) != PrefabType.None); - #endif - } - - public static bool IsInPrefabStage() - { - #if UNITY_2018_3_OR_NEWER - return (PrefabStageUtility.GetCurrentPrefabStage() != null); - #else - return false; - #endif - } - - //******************************************************************************** - // Private Methods - //******************************************************************************** - - } -} +using UnityEngine;
+using UnityEditor;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using UnityEditor.Compilation;
+#if UNITY_2018_3_OR_NEWER
+using UnityEditor.Experimental.SceneManagement;
+#endif
+
+namespace UMotionEditor
+{
+ public static class EditorVersionCompatibilityUtility
+ {
+ //********************************************************************************
+ // Public Properties
+ //********************************************************************************
+
+ //********************************************************************************
+ // Private Properties
+ //********************************************************************************
+
+ //----------------------
+ // Inspector
+ //----------------------
+
+ //----------------------
+ // Internal
+ //----------------------
+
+ //********************************************************************************
+ // Public Methods
+ //********************************************************************************
+
+ public static bool IsModelPrefab(GameObject gameObject)
+ {
+ #if UNITY_2018_3_OR_NEWER
+ return (PrefabUtility.GetPrefabAssetType(gameObject) == PrefabAssetType.Model);
+ #else
+ return (PrefabUtility.GetPrefabType(gameObject) == PrefabType.ModelPrefab);
+ #endif
+ }
+
+ public static bool IsPrefab(GameObject gameObject)
+ {
+ #if UNITY_2018_3_OR_NEWER
+ return (PrefabUtility.GetPrefabAssetType(gameObject) != PrefabAssetType.NotAPrefab);
+ #else
+ return (PrefabUtility.GetPrefabType(gameObject) != PrefabType.None);
+ #endif
+ }
+
+ public static bool IsInPrefabStage()
+ {
+ #if UNITY_2018_3_OR_NEWER
+ return (PrefabStageUtility.GetCurrentPrefabStage() != null);
+ #else
+ return false;
+ #endif
+ }
+
+ //********************************************************************************
+ // Private Methods
+ //********************************************************************************
+
+ }
+}
|