summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-10-13 10:33:05 +0800
committerchai <chaifix@163.com>2020-10-13 10:33:05 +0800
commitfc6de82e75310b4c007d80753a5f58e6692f4855 (patch)
treee6d8d9226595a6727d43f18a218f53533101a4e0 /Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs
parent8cd16fb71177bb61a9475284d944bc6aba30740e (diff)
+misc
Diffstat (limited to 'Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs')
-rw-r--r--Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs234
1 files changed, 117 insertions, 117 deletions
diff --git a/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs b/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs
index ee7861ff..50ec535b 100644
--- a/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs
+++ b/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Application/VersionCompatibilityUtility.cs
@@ -1,118 +1,118 @@
-#if UNITY_EDITOR
-using System.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using UnityEngine;
-
-namespace UMotionEditor
-{
- public static class VersionCompatibilityUtility
- {
- #if !UNITY_2017_4_OR_NEWER
- #error "This Unity version is not supported by UMotion. Please update to Unity 2017.4 or higher."
- #endif
-
- //********************************************************************************
- // Public Properties
- //********************************************************************************
-
- public enum EditorPlatform
- {
- Windows = 0,
- Mac,
- Linux,
- Invalid
- }
-
- public static EditorPlatform CurrentEditorPlatform
- {
- get
- {
- switch (Application.platform)
- {
- case RuntimePlatform.WindowsEditor:
- return EditorPlatform.Windows;
-
- case RuntimePlatform.OSXEditor:
- return EditorPlatform.Mac;
-
- case RuntimePlatform.LinuxEditor:
- return EditorPlatform.Linux;
-
- default:
- return EditorPlatform.Invalid;
- }
- }
- }
-
- public static bool Unity2018_1_OrNewer
- {
- get
- {
- #if UNITY_2018_1_OR_NEWER
- return true;
- #else
- return false;
- #endif
- }
- }
-
- public static bool Unity2018_3_OrNewer
- {
- get
- {
- #if UNITY_2018_3_OR_NEWER
- return true;
- #else
- return false;
- #endif
- }
- }
-
- public static bool Unity2019_1_Or_Newer
- {
- get
- {
- #if UNITY_2019_1_OR_NEWER
- return true;
- #else
- return false;
- #endif
- }
- }
-
- public static bool UsesScriptableRenderPipeline
- {
- get
- {
- #if UNITY_2019_1_OR_NEWER
- return (UnityEngine.Rendering.RenderPipelineManager.currentPipeline != null);
- #else
- #if UNITY_2018_1_OR_NEWER
- return (UnityEngine.Experimental.Rendering.RenderPipelineManager.currentPipeline != null);
- #else
- return false;
- #endif
- #endif
- }
- }
-
- public static string GetCurrentAssemblyName()
- {
- return Assembly.GetExecutingAssembly().GetName().Name;
- }
-
- //********************************************************************************
- // Private Properties
- //********************************************************************************
-
- //********************************************************************************
- // Public Methods
- //********************************************************************************
-
- //********************************************************************************
- // Private Methods
- //********************************************************************************
- }
-}
+#if UNITY_EDITOR
+using System.Collections;
+using System.Collections.Generic;
+using System.Reflection;
+using UnityEngine;
+
+namespace UMotionEditor
+{
+ public static class VersionCompatibilityUtility
+ {
+ #if !UNITY_2017_4_OR_NEWER
+ #error "This Unity version is not supported by UMotion. Please update to Unity 2017.4 or higher."
+ #endif
+
+ //********************************************************************************
+ // Public Properties
+ //********************************************************************************
+
+ public enum EditorPlatform
+ {
+ Windows = 0,
+ Mac,
+ Linux,
+ Invalid
+ }
+
+ public static EditorPlatform CurrentEditorPlatform
+ {
+ get
+ {
+ switch (Application.platform)
+ {
+ case RuntimePlatform.WindowsEditor:
+ return EditorPlatform.Windows;
+
+ case RuntimePlatform.OSXEditor:
+ return EditorPlatform.Mac;
+
+ case RuntimePlatform.LinuxEditor:
+ return EditorPlatform.Linux;
+
+ default:
+ return EditorPlatform.Invalid;
+ }
+ }
+ }
+
+ public static bool Unity2018_1_OrNewer
+ {
+ get
+ {
+ #if UNITY_2018_1_OR_NEWER
+ return true;
+ #else
+ return false;
+ #endif
+ }
+ }
+
+ public static bool Unity2018_3_OrNewer
+ {
+ get
+ {
+ #if UNITY_2018_3_OR_NEWER
+ return true;
+ #else
+ return false;
+ #endif
+ }
+ }
+
+ public static bool Unity2019_1_Or_Newer
+ {
+ get
+ {
+ #if UNITY_2019_1_OR_NEWER
+ return true;
+ #else
+ return false;
+ #endif
+ }
+ }
+
+ public static bool UsesScriptableRenderPipeline
+ {
+ get
+ {
+ #if UNITY_2019_1_OR_NEWER
+ return (UnityEngine.Rendering.RenderPipelineManager.currentPipeline != null);
+ #else
+ #if UNITY_2018_1_OR_NEWER
+ return (UnityEngine.Experimental.Rendering.RenderPipelineManager.currentPipeline != null);
+ #else
+ return false;
+ #endif
+ #endif
+ }
+ }
+
+ public static string GetCurrentAssemblyName()
+ {
+ return Assembly.GetExecutingAssembly().GetName().Name;
+ }
+
+ //********************************************************************************
+ // Private Properties
+ //********************************************************************************
+
+ //********************************************************************************
+ // Public Methods
+ //********************************************************************************
+
+ //********************************************************************************
+ // Private Methods
+ //********************************************************************************
+ }
+}
#endif \ No newline at end of file