49 lines
1.0 KiB
C#
49 lines
1.0 KiB
C#
using UnityEngine;
|
|
|
|
namespace X.Rendering.Scene
|
|
{
|
|
[ExecuteAlways]
|
|
[DefaultExecutionOrder(200)]
|
|
public class CapsuleShadowAreaEffect : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
internal CapsuleShadowAreaSetting capsuleAOSetting = CapsuleShadowAreaSetting.GetDefault();
|
|
[SerializeField, HideInInspector]
|
|
internal Vector4[] capsuleLights;
|
|
[SerializeField]
|
|
internal Bounds Bounds;
|
|
|
|
#if UNITY_EDITOR
|
|
private void Awake()
|
|
{
|
|
if(Application.isPlaying)
|
|
{
|
|
return;
|
|
}
|
|
|
|
SceneEffect.Instance.AddSceneAreaEffect(this);
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
if (Application.isPlaying)
|
|
{
|
|
return;
|
|
}
|
|
|
|
SceneEffect.Instance.RmSceneAreaEffect(this);
|
|
}
|
|
|
|
private void OnValidate()
|
|
{
|
|
if (Application.isPlaying)
|
|
{
|
|
return;
|
|
}
|
|
|
|
SceneEffect.Instance.AreaEffectValidate();
|
|
}
|
|
#endif
|
|
}
|
|
}
|