Skip to content

Commit

Permalink
[unity] add a limit macro for generic wrapper fix #918
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieyang committed Jul 25, 2022
1 parent aecd064 commit 3c298cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion unity/Assets/Puerts/Editor/Src/Generator/Wrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public static StaticWrapperInfo FromType(Type type, List<Type> genTypes)
{
bool IsGenericWrapper = false;
int GenericArgumentsCount = 0;
#if PUERTS_GENERAL || UNITY_2019_OR_NEWER || PUERTS_FEATURE_GENERIC_WRAPPER
// 如果是泛型类,且泛型参数对于PuerTS来说是一个NativeObject类型,则Wrapper可以用泛型处理。
// 这里要先识别出NativeObject的参数位置,并将其替换
if (type.IsGenericType) {
Expand Down Expand Up @@ -169,7 +170,7 @@ public static StaticWrapperInfo FromType(Type type, List<Type> genTypes)
);
}
}
#endif
// 关于懒绑定的成员函数:先全部丢进lazy收集器中。尔后如果发现有同名方法是不lazy的,那么它也要变成不lazy
// 做这个事情的原因是目前还没法做到重载级别的lazy。
LazyMemberCollector lazyCollector = new LazyMemberCollector();
Expand Down

0 comments on commit 3c298cd

Please sign in to comment.