Some Special

Some Special_第1张图片

public Class A:MonoBehavior

{


B b = GetComponent();

b.enabled = false;

b.UpdateCuror();

}

public Class B:MonoBehavior

{

public void UpdateCursor()

{

Debug.Log("if gameobject is disable, func will still be called outside");

}

}

你可能感兴趣的:(Some Special)