miwarnec / uMMORPG

4 stars 0 forks source link

Skillbar not saved #31

Closed Ghetaldus closed 4 years ago

Ghetaldus commented 4 years ago

Versions (please complete the following information)

Describe the bug When you close/logout client skillbar is not saved.

To Reproduce Steps to reproduce the behavior, please explain every single click that is needed:

  1. Open Unity Editor '...'
  2. Build for Windows '....'
  3. Run Editor as server
  4. Run Build as client
  5. Start server only
  6. Start client, create account and login
  7. Create character and enter the game
  8. Move default attack to another slot in skillbar
  9. Close/Quit client
  10. Start client again and log in with same character
  11. Observe that default attack is back at first slot in skillbar

Expected behavior Skillbar is to be saved when character logs out.

System (please complete the following information):

Additional context It seems that with this Mirror version isClient is always false in OnDestroy() in Player.cs. That makes code bellow if (!isServer && !isClient) return; line in OnDestroy() never run on client, therefore SaveSkillbar() never gets executed.

miwarnec commented 4 years ago

thanks, looking into it now

miwarnec commented 4 years ago

it's a mirror bug: https://github.com/vis2k/Mirror/issues/1475 working on a fix

atem1x commented 4 years ago

in 2d 1.53 same problem

miwarnec commented 4 years ago

fix is in V1.185 and will be ported to all other assets too. thanks for reporting.