feat(test): add real UE 5.8 RunLuaTests commandlet, Lua.RunTests command, and fix UnLua .d.ts math/UObject bugs
This commit is contained in:
1 parent
3dd61c32a9
commit
96e3f0d009
29 files changed
+1417
-134
No files matched your search
@@ -287,8 +287,16 @@ export function RunGameplayTests(): void {
|
||||
AssertArrayEqual(trace, ["start", "after_delay", "entered_room"]);
|
||||
AssertEqual(runner.GetActiveTaskCount(), 0);
|
||||
|
||||
// 绑定 UObject 存活自动取消测试
|
||||
const ownerActor = CreateBoundInstance<UE.AActor>({}, "AActor");
|
||||
// 绑定 UObject 存活自动取消测试(兼容独立 Mock 环境与真实 UE 环境)
|
||||
const world = _G.__UE_TEST_WORLD;
|
||||
const ownerActor =
|
||||
world !== undefined
|
||||
? world.SpawnActor<UE.AActor>(
|
||||
UE.AActor.StaticClass(),
|
||||
UE.FTransform(UE.FRotator(0, 0, 0).ToQuat(), UE.FVector(0, 0, 0), UE.FVector(1, 1, 1)),
|
||||
UE.ESpawnActorCollisionHandlingMethod.AlwaysSpawn
|
||||
)!
|
||||
: CreateBoundInstance<UE.AActor>({}, "AActor");
|
||||
let postDestroyExecuted = false;
|
||||
runner.Start(() => {
|
||||
CoroutineTaskRunner.WaitSeconds(1.0);
|
||||
|
||||
Reference in new issue
Block a user