2023-03-26 11:19:03 +08:00
|
|
|
|
namespace DCFApixels.DragonECS
|
|
|
|
|
{
|
2024-09-07 19:06:28 +08:00
|
|
|
|
public static class EcsConsts
|
2023-03-26 11:19:03 +08:00
|
|
|
|
{
|
2024-03-10 19:22:30 +08:00
|
|
|
|
public const string AUTHOR = "DCFApixels";
|
2023-05-07 00:50:02 +08:00
|
|
|
|
public const string FRAMEWORK_NAME = "DragonECS";
|
2024-06-25 23:17:59 +08:00
|
|
|
|
public const string NAME_SPACE = AUTHOR + "." + FRAMEWORK_NAME + ".";
|
2023-05-30 18:30:10 +08:00
|
|
|
|
public const string EXCEPTION_MESSAGE_PREFIX = "[" + FRAMEWORK_NAME + "] ";
|
2023-03-26 11:19:03 +08:00
|
|
|
|
public const string DEBUG_PREFIX = "[DEBUG] ";
|
2023-03-30 01:57:10 +08:00
|
|
|
|
public const string DEBUG_WARNING_TAG = "WARNING";
|
|
|
|
|
public const string DEBUG_ERROR_TAG = "ERROR";
|
2023-12-31 21:03:00 +08:00
|
|
|
|
public const string DEBUG_PASS_TAG = "PASS";
|
2023-04-26 16:45:37 +08:00
|
|
|
|
|
2024-06-25 23:17:59 +08:00
|
|
|
|
public const string PRE_BEGIN_LAYER = NAME_SPACE + nameof(PRE_BEGIN_LAYER);
|
|
|
|
|
public const string BEGIN_LAYER = NAME_SPACE + nameof(BEGIN_LAYER);
|
|
|
|
|
public const string BASIC_LAYER = NAME_SPACE + nameof(BASIC_LAYER);
|
|
|
|
|
public const string END_LAYER = NAME_SPACE + nameof(END_LAYER);
|
|
|
|
|
public const string POST_END_LAYER = NAME_SPACE + nameof(POST_END_LAYER);
|
2023-12-20 23:16:57 +08:00
|
|
|
|
|
|
|
|
|
public const string META_HIDDEN_TAG = "HiddenInDebagging";
|
2024-11-01 20:43:15 +08:00
|
|
|
|
public const string META_OBSOLETE_TAG = "Obsolete";
|
2024-10-06 15:53:14 +08:00
|
|
|
|
public const string META_ENGINE_MEMBER_TAG = "EngineMember";
|
2024-01-07 19:32:16 +08:00
|
|
|
|
|
|
|
|
|
public const int MAGIC_PRIME = 314159;
|
2024-02-22 15:47:38 +08:00
|
|
|
|
|
2024-06-11 02:30:00 +08:00
|
|
|
|
/// meta subgroups
|
|
|
|
|
|
2024-06-13 18:04:18 +08:00
|
|
|
|
public const string PACK_GROUP = "_" + FRAMEWORK_NAME + "/_Core";
|
2024-06-11 02:30:00 +08:00
|
|
|
|
public const string WORLDS_GROUP = "Worlds";
|
|
|
|
|
public const string DI_GROUP = "DI";
|
|
|
|
|
public const string POOLS_GROUP = "Pools";
|
2024-06-13 18:04:18 +08:00
|
|
|
|
public const string PROCESSES_GROUP = "Processes";
|
|
|
|
|
public const string DEBUG_GROUP = "Debug";
|
|
|
|
|
public const string OTHER_GROUP = "Other";
|
2024-11-01 20:43:15 +08:00
|
|
|
|
public const string OBSOLETE_GROUP = "Obsolete";
|
2024-10-12 14:48:13 +08:00
|
|
|
|
public const string TEMPLATES_GROUP = "Templates";
|
|
|
|
|
public const string IMPLEMENTATIONS_GROUP = "Implementation";
|
2024-06-13 18:04:18 +08:00
|
|
|
|
|
|
|
|
|
public const string COMPONENTS_GROUP = "Components";
|
|
|
|
|
public const string SYSTEMS_GROUP = "Systems";
|
2024-10-12 21:02:28 +08:00
|
|
|
|
public const string MODULES_GROUP = "Modules";
|
2024-09-07 19:06:28 +08:00
|
|
|
|
}
|
2024-06-11 02:30:00 +08:00
|
|
|
|
|
2024-09-07 19:06:28 +08:00
|
|
|
|
public static class EcsDefines
|
|
|
|
|
{
|
2024-05-01 16:58:54 +08:00
|
|
|
|
public const bool DISABLE_POOLS_EVENTS =
|
|
|
|
|
#if DISABLE_POOLS_EVENTS
|
|
|
|
|
true;
|
|
|
|
|
#else
|
|
|
|
|
false;
|
|
|
|
|
#endif
|
2024-04-27 17:55:44 +08:00
|
|
|
|
public const bool ENABLE_DRAGONECS_DEBUGGER =
|
|
|
|
|
#if ENABLE_DRAGONECS_DEBUGGER
|
2024-02-22 15:47:38 +08:00
|
|
|
|
true;
|
|
|
|
|
#else
|
|
|
|
|
false;
|
|
|
|
|
#endif
|
2024-04-27 17:55:44 +08:00
|
|
|
|
public const bool ENABLE_DRAGONECS_ASSERT_CHEKS =
|
|
|
|
|
#if ENABLE_DRAGONECS_ASSERT_CHEKS
|
2024-02-22 15:47:38 +08:00
|
|
|
|
true;
|
|
|
|
|
#else
|
|
|
|
|
false;
|
|
|
|
|
#endif
|
2024-04-27 17:55:44 +08:00
|
|
|
|
|
|
|
|
|
public const bool REFLECTION_DISABLED =
|
|
|
|
|
#if REFLECTION_DISABLED
|
2024-02-22 15:47:38 +08:00
|
|
|
|
true;
|
|
|
|
|
#else
|
|
|
|
|
false;
|
|
|
|
|
#endif
|
2024-04-27 17:55:44 +08:00
|
|
|
|
public const bool DISABLE_DEBUG =
|
|
|
|
|
#if DISABLE_DEBUG
|
|
|
|
|
true;
|
|
|
|
|
#else
|
|
|
|
|
false;
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-02-22 15:47:38 +08:00
|
|
|
|
public const bool ENABLE_DUMMY_SPAN =
|
|
|
|
|
#if ENABLE_DUMMY_SPAN
|
|
|
|
|
true;
|
|
|
|
|
#else
|
|
|
|
|
false;
|
2024-02-23 18:34:40 +08:00
|
|
|
|
#endif
|
|
|
|
|
public const bool DISABLE_CATH_EXCEPTIONS =
|
|
|
|
|
#if DISABLE_CATH_EXCEPTIONS
|
|
|
|
|
true;
|
|
|
|
|
#else
|
|
|
|
|
false;
|
2024-02-22 15:47:38 +08:00
|
|
|
|
#endif
|
2023-03-26 11:19:03 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-02-23 18:34:40 +08:00
|
|
|
|
//#if UNITY_2020_3_OR_NEWER
|
|
|
|
|
// [UnityEngine.Scripting.RequireDerived, UnityEngine.Scripting.Preserve]
|
|
|
|
|
//#endif
|
2024-04-28 22:22:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLE_IL2CPP
|
|
|
|
|
// Unity IL2CPP performance optimization attribute.
|
2024-11-08 17:21:36 +08:00
|
|
|
|
namespace Unity.IL2CPP.CompilerServices
|
2024-04-29 17:42:24 +08:00
|
|
|
|
{
|
|
|
|
|
using System;
|
2024-11-08 17:21:36 +08:00
|
|
|
|
internal enum Option
|
2024-04-29 17:42:24 +08:00
|
|
|
|
{
|
2024-04-28 22:22:06 +08:00
|
|
|
|
NullChecks = 1,
|
2024-04-29 17:46:32 +08:00
|
|
|
|
ArrayBoundsChecks = 2,
|
|
|
|
|
DivideByZeroChecks = 3,
|
2024-04-28 22:22:06 +08:00
|
|
|
|
}
|
2024-04-29 17:46:32 +08:00
|
|
|
|
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Struct | AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Delegate, Inherited = false, AllowMultiple = true)]
|
2024-04-29 21:43:27 +08:00
|
|
|
|
internal class Il2CppSetOptionAttribute : Attribute
|
2024-04-29 17:42:24 +08:00
|
|
|
|
{
|
2024-04-28 22:22:06 +08:00
|
|
|
|
public Option Option { get; private set; }
|
|
|
|
|
public object Value { get; private set; }
|
2024-04-29 17:46:32 +08:00
|
|
|
|
public Il2CppSetOptionAttribute(Option option, object value)
|
|
|
|
|
{
|
|
|
|
|
Option = option;
|
|
|
|
|
Value = value;
|
|
|
|
|
}
|
2024-04-28 22:22:06 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|