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,33 @@
using XCEngine;
namespace Gameplay
{
public sealed class LightPropertyProbe : MonoBehaviour
{
public bool LightLookupSucceeded;
public float ObservedIntensity;
public float ObservedRange;
public float ObservedSpotAngle;
public bool ObservedCastsShadows;
public void Start()
{
LightLookupSucceeded = TryGetComponent(out Light light);
if (light == null)
{
LightLookupSucceeded = false;
return;
}
ObservedIntensity = light.intensity;
ObservedRange = light.range;
ObservedSpotAngle = light.spotAngle;
ObservedCastsShadows = light.castsShadows;
light.intensity = 2.5f;
light.range = 42.0f;
light.spotAngle = 55.0f;
light.castsShadows = true;
}
}
}