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.

Runner.Spawn is empty?

vimrzhang
2022-12-06 23:55:14

Sometimes the pickUp is empty.

var pickUp = Runner.Spawn(pickup, transform.position, transform.rotation,Object.InputAuthority,BeforePickupSpawned);

This is often the case with clients

Comments

vimrzhang
2022-12-07 06:13:29

Thanks to discord popo for replying.

  • On a client in hosted or client/server mode, the default action is that nothing will happen and that the call will return null.

https://doc.photonengine.com/en-us/fusion/current/manual/spawning

  • The reason for being null is explained here. I hope it helps you

  • Spawning | Photon Engine

  • Global cross platform multiplayer game backend as a service (SaaS, Cloud) for synchronous and asynchronous games and applications. SDKs are available for android, iOS, .NET., Mac OS, Unity 3D, Windows, Unreal Engine, HTML5 and others.

  • Spawn seems to be called from the used Client and Host. It is null on the Client and not null on the Host.

Back to top