Failed to 'network-remove' GameObject because has no PhotonView

Options
I got this error when calling 'PhotonNetwork.Destroy(hpBar.gameObject);'
But, hpBar has a PhotonView component.
I wonder why this happens. Can anybody help me on this?

Comments

  • Hi @mhhk88,

    you can only use PhotonNetwork.Destroy(...) on GameObjects that have been created by using either PhotonNetwork.Instantiate(...) or PhotonNetwork.InstantiateSceneObject(...). If you have used Manual Instantiation for this object, you have to remove them manually, too.