The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Fusion Runner.Spawn

zybillyjay
2021-12-22 11:08:22

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.

Comments

Tobias
2021-12-22 15:53:23

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.

zybillyjay
2021-12-23 07:09:23

Tobias 2021-12-22T15:53:23+00:00

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.

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

ramonmelo
2021-12-23 12:21:42

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

arturmandas
2023-02-15 19:31:59

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?

Back to top