Activate and deactivate gameobjects over network
Options
hey all, i'm having problem activating and deactivating components across network. whenever i launch a rocket rocket deactivate from my side but i didn't deactivate on the other side over network..
i'm using simple code for deactivating component that is below.
rocket.SetActivate(false);
so is there anybody who can tell me how to write activating or deactivating code in Photon??
i'm using simple code for deactivating component that is below.
rocket.SetActivate(false);
so is there anybody who can tell me how to write activating or deactivating code in Photon??
0
Comments
-
Hi @hasnainn,
Thank you for choosing Photon!
Enabling or disabling components and activating or deactivating GameObjects is not automatically synchronized out-of-the-box using PUN.
You need to do this manually using RPC or RaiseEvent or something else.
But why do you need this?
Maybe you can just destroy the GameObject usingPhotonNetwork.Destroy
and this way it will be synchronized on all clients?
BTW: I moved this discussion to the PUN category.0 -
BTW is that possible activating and deactivating in Photon???As I explained in the previous message, you need to implement this yourself.
Note: I'm not sure if rockets should be network instantiated. Maybe you just need to send an RPC or a RaiseEvent to tell that a rocket is launched and its trajectory?0