OnInput not call

The whole answer can be found below.

Please note: 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! And we offer you support through 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.

OnInput not call

ykyrus
2022-04-27 17:47:39

Hello Fusion Team

For example Fusion 100, I make "Player.cs" inherit from INetworkRunnerCallbacks

       public class Player : NetworkBehaviour,INetworkRunnerCallbacks

I see OnInput in file "Player.cs"don't call. it only call in file "BasicSpawner.cs".

When spawn Player i see we have set InputAuthority

NetworkObject networkPlayerObject = runner.Spawn(_playerPrefab, spawnPosition, Quaternion.identity, player);    




Why it happens ?    

Comments

emotitron
2022-04-28 13:39:07

INetworkRunnerCallbacks will automatically be found by the NetworkRunner if your component is on the same object as the NetworkRunner. However If this component is NOT on the same GameObject as your NetworkRunner, you will need to register your component for callbacks using Runner.AddCallbacks(INetworkRunner).

Back to top