DragonECS/src/Consts.cs

96 lines
2.6 KiB
C#
Raw Normal View History

2023-03-26 11:19:03 +08:00
namespace DCFApixels.DragonECS
{
public class EcsConsts
{
2024-03-10 19:22:30 +08:00
public const string AUTHOR = "DCFApixels";
public const string FRAMEWORK_NAME = "DragonECS";
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";
public const string PRE_BEGIN_LAYER = nameof(PRE_BEGIN_LAYER);
public const string BEGIN_LAYER = nameof(BEGIN_LAYER);
public const string BASIC_LAYER = nameof(BASIC_LAYER);
public const string END_LAYER = nameof(END_LAYER);
public const string POST_END_LAYER = nameof(POST_END_LAYER);
public const string META_HIDDEN_TAG = "HiddenInDebagging";
2024-01-07 19:32:16 +08:00
public const int MAGIC_PRIME = 314159;
2024-02-22 15:47:38 +08:00
/// defs
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;
#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
}
}
//#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-04-29 17:42:24 +08:00
namespace Unity.IL2CPP.CompilerServices
{
using System;
2024-04-29 21:43:27 +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