23 lines
696 B
C#
23 lines
696 B
C#
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;
|
|
}
|
|
}
|
|
}
|