This pack contains prefabs and scripts for creating a multiplayer FPS in Unity3D. Requires Photon by Exit Games.
Setup like this:
-
Drag the Code_enable, Code_game, and Code_menu prefabs into your scene. The Code_game prefab is the spawn location so place accordingly.
-
Create a resources folder and place your player prefab in that folder. Attach a photonview to the prefab.
-
Also attach a FirstPersonNetwork script to the player prefab and add the camera to the “camera” variable.
-
Drag the player prefab to the “player prefab” slot on the Code_game GameManager script.
-
Run your scene!
If you don’t feel like using this package, I have a tutorial series on how to do this from scratch
(not yet finished). Click here to go to my channel: HSM Interactive’s YouTube Channel
(Don’t forget to attach a photon view to the Code_game prefab if it’s missing)
1409613–73599–$Mulltiplayer FPS - Photon.unitypackage (12.9 KB)