fix(scripting): stabilize mono wrapper test teardown
This commit is contained in:
33
managed/GameScripts/LightPropertyProbe.cs
Normal file
33
managed/GameScripts/LightPropertyProbe.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user