update il2cpp atrs

This commit is contained in:
Mikhail 2026-03-17 15:40:04 +08:00
parent 492416aba1
commit 18db9a24b5
5 changed files with 12 additions and 2 deletions

View File

@ -1,8 +1,16 @@
using System;
using System.Runtime.CompilerServices;
using static DCFApixels.DragonECS.Core.Internal.MemoryAllocator;
#if ENABLE_IL2CPP
using Unity.IL2CPP.CompilerServices;
#endif
namespace DCFApixels.DragonECS.Core.Internal
{
#if ENABLE_IL2CPP
[Il2CppSetOption(Option.NullChecks, false)]
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
#endif
internal static unsafe class AllocatorUtility
{
public static void ClearAllocatedMemory(IntPtr ptr, int startByte, int lengthInBytes)

View File

@ -2,7 +2,6 @@
#undef DEBUG
#endif
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@ -455,7 +454,7 @@ namespace DCFApixels.DragonECS.Core.Internal
}
[StructLayout(LayoutKind.Explicit)]
private unsafe struct Union
private struct Union
{
[FieldOffset(0)]
public Array array;

View File

@ -26,6 +26,7 @@ namespace DCFApixels.DragonECS
/// <summary>Pool for IEcsComponent components</summary>
#if ENABLE_IL2CPP
[Il2CppSetOption(Option.NullChecks, false)]
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
#endif
[MetaColor(MetaColor.DragonRose)]
[MetaGroup(EcsConsts.PACK_GROUP, EcsConsts.POOLS_GROUP)]

View File

@ -26,6 +26,7 @@ namespace DCFApixels.DragonECS
/// <summary> Pool for IEcsTagComponent components. </summary>
#if ENABLE_IL2CPP
[Il2CppSetOption(Option.NullChecks, false)]
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
#endif
[MetaColor(MetaColor.DragonRose)]
[MetaGroup(EcsConsts.PACK_GROUP, EcsConsts.POOLS_GROUP)]

View File

@ -38,6 +38,7 @@ namespace DCFApixels.DragonECS
/// <summary>Pool for IEcsValueComponent components</summary>
#if ENABLE_IL2CPP
[Il2CppSetOption(Option.NullChecks, false)]
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
#endif
[MetaColor(MetaColor.DragonRose)]
[MetaGroup(EcsConsts.PACK_GROUP, EcsConsts.POOLS_GROUP)]