[Style] GetComponent null체크 추가

This commit is contained in:
HaeinLEE 2025-04-21 13:19:00 +09:00
parent b8ea0892b8
commit bec98caa29

View File

@ -19,7 +19,10 @@ public class InteractionController : MonoBehaviour
if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer))) if (interactionLayerMask == (interactionLayerMask | (1 << other.gameObject.layer)))
{ {
ActionType interactionType = other.gameObject.GetComponent<InteractionProp>().RoutineEnter(); ActionType interactionType = other.gameObject.GetComponent<InteractionProp>().RoutineEnter();
PopActionOnScreen(interactionType); if( interactionType != null )
{
PopActionOnScreen(interactionType);
}
} }
} }
@ -91,6 +94,8 @@ public class InteractionController : MonoBehaviour
} }
}); });
break; break;
default:
break;
} }
} }
} }