Added debug message is runtime set does not exist

This commit is contained in:
Stedd 2024-10-05 17:11:50 +02:00
parent c81a750f2f
commit 813d034fc5
1 changed files with 8 additions and 1 deletions

View File

@ -19,7 +19,14 @@ namespace GameDev.CoreSystems
private void OnEnable() private void OnEnable()
{ {
_activeTargetableRuntimeSet.Add(this); if (_activeTargetableRuntimeSet != null)
{
_activeTargetableRuntimeSet.Add(this);
}
else
{
Debug.LogError("TargetableRuntimeSet does not exist");
}
} }
private void OnDisable() private void OnDisable()