123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- namespace XGame.Framework
- {
- /// <summary>
- /// 宏定义
- /// </summary>
- public static class MacroDefine
- {
- //Release
- public const string FINAL_RELEASE = "FINAL_RELEASE";
- //Debug
- public const string DEBUG = "DEBUG";
- //Profiler
- public const string PROFILER = "PROFILER";
- //Editor
- public const string UNITY_EDITOR = "UNITY_EDITOR";
- public const string UNITY_EDITOR_WIN = "UNITY_EDITOR_WIN";
- public const string UNITY_EDITOR_OSX = "UNITY_EDITOR_OSX";
- //Standalone
- public const string UNITY_STANDALONE = "UNITY_STANDALONE";
- public const string UNITY_STANDALONE_WIN = "UNITY_STANDALONE_WIN";
- public const string UNITY_STANDALONE_OSX = "UNITY_STANDALONE_OSX";
- //Android
- public const string UNITY_ANDROID = "UNITY_ANDROID";
- //iOS
- public const string UNITY_IOS = "UNITY_IOS";
- //No_Try_Catch
- public const string NO_TRY_CATCH = "NO_TRY_CATCH";
- public const string XGAME_ASSERT = "XGAME_ASSERT";
- public static bool IsEditor
- {
- get
- {
- #if UNITY_EDITOR
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsEditorWin
- {
- get
- {
- #if UNITY_EDITOR_WIN
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsEditorOSX
- {
- get
- {
- #if UNITY_EDITOR_OSX
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsStandalone
- {
- get
- {
- #if UNITY_STANDALONE
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsStandaloneWin
- {
- get
- {
- #if UNITY_STANDALONE_WIN
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsStandaloneOSX
- {
- get
- {
- #if UNITY_STANDALONE_OSX
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsAndroid
- {
- get
- {
- #if UNITY_ANDROID
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsiOS
- {
- get
- {
- #if UNITY_IOS
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsRelease
- {
- get
- {
- #if FINAL_RELEASE
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsDebug
- {
- get
- {
- #if DEBUG
- return true;
- #else
- return false;
- #endif
- }
- }
- public static bool IsProfiler
- {
- get
- {
- #if PROFILER
- return true;
- #else
- return false;
- #endif
- }
- }
- }
- }
|