Hertzole / gold-player

A first person player controller for Unity.
MIT License
160 stars 16 forks source link

Is there any info/documentation on multiplayer integration? Since it's even mentioned to be 'easy' to setup. #46

Closed ZayNepz closed 1 year ago

Hertzole commented 1 year ago

Hey there!
Unfortunately, there is no documentation about this and I don't remember exactly what made it easy to implement.
But the easiest way to use Gold Player for multiplayer is to:

  1. Set InitOnStart on GoldPlayerController to false and then call Initialize manually on your local player.
  2. Disable the Camera and Movement modules on non-local players by disabling Camera.CanLookAround and Movement.CanMoveAround respectively. There should probably be a step here to only get the local input but I'm not sure as of right now you could go about it because it's very dependent on how you handle your input.

I hope this helps! :)

ZayNepz commented 1 year ago

Thanks for the quick reply. I tried this but stumbled upon not being able to edit script. The code 'blue-ish', as in some other downloaded content, and it does not recognize any new methods, behaviors or added libraries.

Hertzole commented 1 year ago

You may need to refresh your project files. You can do so in Unity by going to Preferences -> External tools -> Regenerate project files.
If that isn't available to you, you can go to your project folder and remove all files with the .csproj file extension.

ZayNepz commented 1 year ago

You may need to refresh your project files. You can do so in Unity by going to Preferences -> External tools -> Regenerate project files. If that isn't available to you, you can go to your project folder and remove all files with the .csproj file extension.

thanks, got it