From ff47263fcebcd99a8729ec2ab1ce0bc4d72f9bea Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Mon, 11 Sep 2023 12:15:43 +0200 Subject: [PATCH] Add PhotonPun documentaion --- .../Scripts/HumanoidControl_Doc.cs | 2 +- .../Scripts/Networking/PhotonPun.meta | 8 +++ .../Networking/PhotonPun/PhotonPun_Doc.cs.cs | 64 +++++++++++++++++++ .../PhotonPun/PhotonPun_Doc.cs.cs.meta | 11 ++++ 4 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 Runtime/HumanoidControl/Scripts/Networking/PhotonPun.meta create mode 100644 Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs create mode 100644 Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs.meta diff --git a/Runtime/HumanoidControl/Scripts/HumanoidControl_Doc.cs b/Runtime/HumanoidControl/Scripts/HumanoidControl_Doc.cs index 021c41d..55d5404 100644 --- a/Runtime/HumanoidControl/Scripts/HumanoidControl_Doc.cs +++ b/Runtime/HumanoidControl/Scripts/HumanoidControl_Doc.cs @@ -1,7 +1,7 @@ namespace Passer.Humanoid { /// \author PasserVR - /// \version 4.0 + /// \version 4 /// \mainpage %Humanoid Control for Unity /// /// Note: this documentation is still work in progress... diff --git a/Runtime/HumanoidControl/Scripts/Networking/PhotonPun.meta b/Runtime/HumanoidControl/Scripts/Networking/PhotonPun.meta new file mode 100644 index 0000000..2d06628 --- /dev/null +++ b/Runtime/HumanoidControl/Scripts/Networking/PhotonPun.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0abc5e15499b06b4c86e3bbbba38e130 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs b/Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs new file mode 100644 index 0000000..a5607b2 --- /dev/null +++ b/Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs @@ -0,0 +1,64 @@ +namespace Passer.Humanoid { + + /// \page PhotonPunDoc Photon PUN + /// + /// Setup + /// ===== + /// In order to use Photon PUN 2 in your project. + /// You need to import the Photon PUN 2 package first from the asset store. + /// + /// Networking Starter + /// ================== + /// When using Photon PUN 2, the Networking Starter component has the following options: + /// \image html PhotonPunNetworkingStarter.png + /// \image rtf PhotonPunNetworkingStarter.png + /// + /// Networking PrefabThe player prefab which will be spawned across the network. + /// This defaults to HumanoidPlayer for Photon Networking.Room NameThe name of the environment shared by the playersGame VersionThe version of the environment shared by the playersSend RateThe number of updates per second communicated through the network. + /// + /// Photon Voice + /// ============ + /// You need to include the Photon Voice 2 package in your project. + /// + /// In the Photon Server Settings (see Window Menu->Photon Unity Networking->Highlight Server Settings, + /// set the Settings->App Id Voice to the same App Id you use for setting up Photon 2. + /// This App Id is also found in the App Id Realtime field. + /// + /// Select the Photon PUN prefab which is spawned across the network. + /// If you use the Networking Starter this usually is the HumanoidPun prefab which is found in + /// Assets/Humanoid/Prefabs/Networking/Resources/ + /// Add the following components to the HumanoidPun prefab: + /// + /// Add a Photon Voice View component + /// + /// Add a Recorder component, make sure you have Auto Start and Transmit Enabled switched on + /// + /// Set Photon Voice View->Recorder in Use to this Recorder + /// + /// The result should look like this: + /// \image html PhotonPunVoiceSetup.png + /// \image rtf PhotonPunVoiceSetup.png + /// + /// Now if you start you project, Photon Voice should work. + /// + /// Self Hosted Networking + /// ====================== + /// For local networking Photon PUN, go to the following page: + /// https://www.photonengine.com/en-US/sdks#server-sdkserverserver. + /// Then select 'Server': + /// + /// And download the SDK.  + /// + /// Instructions on how to set it up can be found here:  + /// https://doc.photonengine.com/en-us/server/current/getting-started/photon-server-in-5min + /// + /// The settings you need to use in Unity for Photon 2 are as follows: + /// \image html PhotonPunSelfhosted.png + /// \image rtf PhotonPunSelfhosted.png + /// + /// In this case, we use a direct IP Address (localhost/127.0.01), so Use Name Server is disabled. + /// As the protocol is Udp, you need to set port to 5055. Other port numbers can be found here: + /// https://doc.photonengine.com/en-us/realtime/current/connection-and-authentication/tcp-and-udp-port-numbers + /// If you start the scene now, Photon should connect to the local server. + /// +} \ No newline at end of file diff --git a/Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs.meta b/Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs.meta new file mode 100644 index 0000000..afade20 --- /dev/null +++ b/Runtime/HumanoidControl/Scripts/Networking/PhotonPun/PhotonPun_Doc.cs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 25694d80cf4ce2940b87374eb5c2d879 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: