fix: UnAssign Problems
This commit is contained in:
@@ -88,7 +88,7 @@ public class BehaviourController : IBehaviourController
|
||||
|
||||
public bool Assign(IGameObject gameObject)
|
||||
{
|
||||
if (GameObject.Initialized)
|
||||
if (GameObject is not null && GameObject.Initialized)
|
||||
return false;
|
||||
|
||||
_gameObject = gameObject;
|
||||
@@ -98,7 +98,7 @@ public class BehaviourController : IBehaviourController
|
||||
|
||||
public bool Unassign()
|
||||
{
|
||||
if (GameObject.Initialized)
|
||||
if (GameObject is not null && GameObject.Initialized)
|
||||
return false;
|
||||
|
||||
_gameObject = null!;
|
||||
|
Reference in New Issue
Block a user