//line #46 --- NetworkCharacterLocomotionHandler.cs
if (m_NetworkInfo.IsLocalPlayer()) {
} else {
// Non-local players will not be controlled with player input.
enabled = false;
m_CharacterLocomotion.enabled = false;
}
Yes - I would try that route. It's better to use the event rather than disabling the component itself since when you disable the component it also unregisters itself from certain things. If you haven't seen it this script may help with switching between AI and player (though it's not networked):I haven't tried to replace the above with "OnEnableGameplayInput". Would that work?
private void Start()
{
// Remote characters will not have a local look source. The current component should act as the look source.
if (!isLocalPlayer)
{
EventHandler.UnregisterEvent<ILookSource>(m_GameObject, "OnCharacterAttachLookSource", OnAttachLookSource);
EventHandler.ExecuteEvent<ILookSource>(m_GameObject, "OnCharacterAttachLookSource", this);
}
}