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