OnInput not call
The whole answer can be found below.
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).
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
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