protected RemoveInstantiatedGO ( GameObject go, bool localOnly ) : void | ||
go | GameObject | GameObject to cleanup. |
localOnly | bool | For localOnly, tests of control are skipped and the server is not updated. |
Résultat | void |
public static void Destroy(PhotonView targetView) { if (targetView != null) { networkingPeer.RemoveInstantiatedGO(targetView.gameObject, !inRoom); } else { Debug.LogError("Destroy(targetPhotonView) failed, cause targetPhotonView is null."); } }
/// <summary> /// Destroys given GameObject. Requires it to have photonview(s) attached. /// </summary> /// <param name="go"></param> public static void Destroy(GameObject go) { networkingPeer.RemoveInstantiatedGO(go); }