Hello Community,
I wonder if someone could Answer my Question. I have my Animations (mecanim) synced over the Network which works fine so far. But now I got this Trigger that starts some Special Animation which is only played once before mecanim gets back into my Move-State. The Move animations (a 2D Blendtree) are synced across the Network but not the Special Animation started by the Trigger.
The Trigger itself works, on the Local Machine everything works as expected but it seems as if the Trigger wouldn’t get synced across the Network.
So my question is: Does anyone know if it is possible to sync Mecanim Trigger Events across the Network and if so how? Or is it just not possible and I have to find another way to sync my Animation?
Now after almost a month without any replies here I could finally figure out the solution by myself. In case someone else Encounters this Problem I’ll post my solution here:
Even if all other Animation stuff works fine with Setting the Animation Parameters by Animator.SetFloat
or Animator.SetBool
it seems I have to set Triggers with NetworkAnimator.SetTrigger
instead of Animator.SetTrigger
for it to work across the Network. I also did Set the AutoSendParameter Option of all Parameters for all Instances of a Player Object with:
public override void OnStartLocalPlayer() {
for(int i = 0; i < 4; i++) {
netAnim.SetParameterAutoSend(i, true);
}
}
for the local Player Object and:
public override void PreStartClient() {
for (int i = 0; i < 4; i++) {
netAnim.SetParameterAutoSend(i, true);
}
}
for all other instances of the Player Object
Now my Special Animation (which is a throwing Animation that Triggers an Event itself) is played properly on Server and Clients.