Fusion Runner.Spawn
When I Spawn a gameobject, How can I let other client kown this, then instantate the same gameobject? Just list the PUN2 can do this.
Answers
-
Spawn is being used to "network" the instantiation of an object. It will be synchronized for you and all clients get to see the same object (instanced from a prefab).
The doc series Fusion 100 shows this and most of the basics.
0 -
In Fusion 100, other clients spawn by OnPlayerJoined() fuction, I don`t what do this, I just want to konw others spawn any time, not just by OnPlayerJoined
0 -
Hi @zybillyjay ,
You can spawn your client players at any time, that is up to your implementation, it is just common to spawn it when the Player joins the Game Session.
Keep in mind that Fusion has two main architectures, Client-Server and Shared Mode.
You can read more about the difference here: https://doc.photonengine.com/en-us/fusion/current/manual/state-transfer#network_topologies
If you want that your clients spawn their own characters then you are probably looking to use Shared Mode, as it is similar to PUN and let players do this kind of action.
Take a look here for more info about spawning NetworkObjects: https://doc.photonengine.com/en-us/fusion/current/manual/spawning
--
Ramon Melo
Photon Fusion Team
0 -
Hi @zybillyjay
I want to spawn different looking characters by loading them via url which is sent via RPC (network id + url sent in a string) - input authority players send rpcs and load avatar using local URL, non input load that avatar using url obtained from RPC, first checking for id match. This worked nice in PUN. Using shared mode and got stuck - feel almost there, but missing something. Like rpc is not always received on the non-input authority end. Any ideas?
0