[Solved]Actor custom properties

Options
Vilminus
edited March 2014 in DotNet
Hi! I'm playing with the Photon Server and the sample unity demo (Island).
I'm trying to use mecanim on network. I got the new sample assets from unity.

The main concept is that, I set a custom property for the actors (named anims and this is a float[] variable). I don't know if this is the right way or not, but my anims variable doesn't change on the "other-client" side. I mainly coppied the get-set color methods btw.

This is how I tried to implement:
Third Person User Controler class (comes form unity asset) calls the "Animation Sync" method of the Player class (form the photon island)
The Player class calls the SetAnimationParams method of the Avatar.
Then the Avatar send a setProperties operation request to the server.

On the other side, the server send an event, what is chached by the World Entered class.
The world entered class in the HandleEventItemPropertiesSet method call the item setAnimationParams method, and set the params.
Then the Actor class get the Item Anims parameter, and forwards to the Third Person Character (again from sample asset) class, in the right form.

This is kind of the same way as the get-set color or the get-set text is working, but somehow the Item.Anims variable is always the same on the "other-client". I can't see why... the set text working well..

Comments

  • Solved.

    The problem was that I forgot to add the new custom parameter setters and getters in the HandleEventItemProperties and HandleEventItemPropertiesSet methods of the WorldEntered class.
  • Tobias
    Options
    I'm glad you found it.
    I am not sure if could have helped right away. The "World Entered class" and "HandleEventItemPropertiesSet" and other referenced classes and methods sound so unfamiliar that I wouldn't know where to begin.

    If you got problems again: The better you can explain the core issue in a few words, the quicker we can usually help.