fix(scripting): stabilize mono wrapper test teardown

This commit is contained in:
2026-04-15 14:27:21 +08:00
parent 982a877714
commit 65cb212020
8 changed files with 351 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
using XCEngine;
namespace Gameplay
{
public sealed class CameraLightLookupProbe : MonoBehaviour
{
public bool HasCamera;
public bool HasLight;
public bool CameraLookupSucceeded;
public bool LightLookupSucceeded;
public void Start()
{
HasCamera = HasComponent<Camera>();
HasLight = HasComponent<Light>();
CameraLookupSucceeded = TryGetComponent(out Camera camera);
LightLookupSucceeded = TryGetComponent(out Light light);
CameraLookupSucceeded = CameraLookupSucceeded && camera != null;
LightLookupSucceeded = LightLookupSucceeded && light != null;
}
}
}