Skip to content

Commit 29d4c4c

Browse files
committed
加上UnityEngine.Scripting.Preserve(unity2022 webgl默认设置下lua用例会报"no static field v")
1 parent 03a9d0a commit 29d4c4c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

unity/test/Src/Cases/Javascript/CrossLang/GenericTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ public Inner()
5656
}
5757
}
5858

59+
// Unity对应没引用的字段也可能剪裁
60+
// 不加这个在unity2022 webgl默认设置下lua用例会报"no static field v",js由于没有这检查不会报错
61+
[UnityEngine.Scripting.Preserve]
5962
public static T v;
6063
}
6164

0 commit comments

Comments
 (0)