Photon PUN Classic
In order to use Photon PUN in your project. You need to import the Photon PUN package first from the asset store.
After this, go to the Edit Menu->Preferences. Humanoid Control will check the availability of the package and the Photon Networking option should appear in the Networking Support property:
When Photon Networking is selected for Networking Support, networking support components like the Networking Starter and Networking Transform should adapt automatically to Photon Networking.
The Grocery Store Networking demo scene will now support Photon Networking.
When using Photon PUN Class, the Networking Starter has the following options:
|Networking Prefab||The player prefab which will be spawned across the network. This defaults to HumanoidPun for Photon Networking.|
|Room Name||The name of the environment shared by the players.|
|Game Version||The version of the environment shared by the players|
|Send Rate||The number of updates per second communicated through the network.|
Self Hosted Networking
The Photon Networking default is to use a cloud based server hosted by Photon. As an alternative, you can use your own Photon Server. This can be downloaded here on the Photon Engine SDKs page.
Then you should change the Photon Server Settings to ‘Self Hosted’ and set the Server Address to the ip address of the machine running the server: