mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-19 02:24:37 +08:00
fix REFLECTION_DISABLED
This commit is contained in:
parent
a9e3580f37
commit
ba8c4d0600
@ -119,12 +119,13 @@ namespace DCFApixels.DragonECS
|
|||||||
Builder builder = new Builder(world);
|
Builder builder = new Builder(world);
|
||||||
Type aspectType = typeof(TAspect);
|
Type aspectType = typeof(TAspect);
|
||||||
EcsAspect newAspect;
|
EcsAspect newAspect;
|
||||||
//TODO добавить оповещение что инициализация через конструктор не работает
|
|
||||||
#if !REFLECTION_DISABLED
|
|
||||||
ConstructorInfo constructorInfo = aspectType.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[] { typeof(Builder) }, null);
|
|
||||||
|
|
||||||
var buildersStack = GetBuildersStack();
|
var buildersStack = GetBuildersStack();
|
||||||
buildersStack.Push(builder);
|
buildersStack.Push(builder);
|
||||||
|
|
||||||
|
//TODO добавить оповещение что инициализация через конструктор не работает
|
||||||
|
#if !REFLECTION_DISABLED
|
||||||
|
ConstructorInfo constructorInfo = aspectType.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, new Type[] { typeof(Builder) }, null);
|
||||||
if (constructorInfo != null)
|
if (constructorInfo != null)
|
||||||
{
|
{
|
||||||
newAspect = (EcsAspect)constructorInfo.Invoke(new object[] { builder });
|
newAspect = (EcsAspect)constructorInfo.Invoke(new object[] { builder });
|
||||||
|
Loading…
Reference in New Issue
Block a user