function Awake(){
//if(networkView.isMine){
// this.enabled = false;
// return;
//}
}
function Update () {
if(networkView.isMine){
if(Input.GetAxis("Vertical")){
//networkView.RPC("DoAnimations", RPCMode.All, networkView.viewID, 1);
animation.CrossFade("Run01");
}
else{
animation.CrossFade("Idle01");
}
}
}
@RPC function DoAnimations(view : NetworkViewID, animState : int){
var id : NetworkView = NetworkView.Find(view);
var t : Transform = id.gameObject.transform;
switch(animState){
case 0 :
t.gameObject.GetComponent(Animation).animation.CrossFade("Idle01");
break;
case 1 :
t.gameObject.GetComponent(Animation).animation.CrossFade("Run01");
break;
}
}
Hello again , this is becoming quite reoccuring.
Heres the thing this time. I hvae a GameObject with a movement script , collider, rigidbody etc… and as a child of this gameObject, i have a model gameObject, with a couple animations applied to it. Both of these gameObjects have a networkView attached, the parent object set to observe its transform, and also the child objects observe is set to the transform. It should be noted that i have tried observing the animations component directly as well.
Now, all players start out fine, and see each others idle animations… but when players move around , none of their other animations are observed by any other player.
I have tried several methods , including using RPC to send data , but nothing seems to be working. I am so bad at networking ugh! , lol. Hers the script attached to the child object with animation component.