From effb639e86c18e7dff13d89e0371beb69fc062c2 Mon Sep 17 00:00:00 2001 From: xpeng <1216772231@qq.com> Date: Fri, 26 Aug 2022 03:38:31 +0200 Subject: [PATCH] update readme v0.9 --- .../Scripts/Networks/Display/WindowEncoder.cs | 2 +- Assets/StreamingAssets.meta | 8 -------- .../UnityServicesProjectConfiguration.json | 1 - .../UnityServicesProjectConfiguration.json.meta | 7 ------- ProjectSettings/EditorBuildSettings.asset | 6 +++--- ProjectSettings/ProjectSettings.asset | 3 +-- README.md | 15 +++++++++++++++ README_zh.md | 17 +++++++++++++++++ 8 files changed, 37 insertions(+), 22 deletions(-) delete mode 100644 Assets/StreamingAssets.meta delete mode 100644 Assets/StreamingAssets/UnityServicesProjectConfiguration.json delete mode 100644 Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta diff --git a/Assets/Scripts/Networks/Display/WindowEncoder.cs b/Assets/Scripts/Networks/Display/WindowEncoder.cs index 7ea1510..bf159df 100644 --- a/Assets/Scripts/Networks/Display/WindowEncoder.cs +++ b/Assets/Scripts/Networks/Display/WindowEncoder.cs @@ -56,7 +56,7 @@ public class WindowEncoder : NetworkBehaviour void SetSetting(uNvEncoder.EncoderDesc _setting, int resolutionDivider) { var JObj= JObject.FromObject(_setting); - JObj.Remove("width"); JObj.Remove("height"); + JObj.Remove("width"); JObj.Remove("height"); JObj.Remove("format"); JObj["ResolutionDivider"] = resolutionDivider; JsonConfig.SetJObject("EncoderSetting", JObj); } diff --git a/Assets/StreamingAssets.meta b/Assets/StreamingAssets.meta deleted file mode 100644 index 1c3fa0b..0000000 --- a/Assets/StreamingAssets.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1cfe2a69ab768714189049973670160e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json b/Assets/StreamingAssets/UnityServicesProjectConfiguration.json deleted file mode 100644 index c03aba6..0000000 --- a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json +++ /dev/null @@ -1 +0,0 @@ -{"Keys":["com.unity.services.core.cloud-environment","com.unity.services.qos.version","com.unity.services.lobby.version","com.unity.services.core.version","com.unity.services.authentication.version","com.unity.services.relay.version"],"Values":[{"m_Value":"production","m_IsReadOnly":true},{"m_Value":"1.0.1","m_IsReadOnly":true},{"m_Value":"1.0.1","m_IsReadOnly":true},{"m_Value":"1.4.2","m_IsReadOnly":true},{"m_Value":"2.1.1","m_IsReadOnly":true},{"m_Value":"1.0.3","m_IsReadOnly":true}]} \ No newline at end of file diff --git a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta b/Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta deleted file mode 100644 index 9362bb3..0000000 --- a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4732ca33743d3c94dba2dac439f9b344 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 8ff99ec..ded9831 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -5,9 +5,9 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: - - enabled: 0 - path: - guid: 00000000000000000000000000000000 + - enabled: 1 + path: Assets/Scenes/MainScene.unity + guid: e9b3d4fffee91174bbf7c09ad6cc9415 m_configObjects: Unity.XR.Oculus.Settings: {fileID: 11400000, guid: 882a733244498a8469ee2565acf52f50, type: 2} diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index bed888b..076c9cd 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -188,8 +188,7 @@ PlayerSettings: - {fileID: 0} - {fileID: 0} - {fileID: 0} - - {fileID: -6018045015233401694, guid: 3999ab811e936714280a476b3a032d86, type: 2} - - {fileID: 6536100391545742739, guid: 55d1ec7a4296de343b6d3bb6f9a19731, type: 2} + - {fileID: 0} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1 diff --git a/README.md b/README.md index 2dbb323..f84a201 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,21 @@ Some configs in config.json are only the index of the dropdown. You can use the pointer to point the third-person camera and grab it to the position where you want to be. +## Multiplayer Configuration +--- +All the settings related to multiplayer are inside config.json. + +- **HostIP:** IP address of the host to be connected by the client, supports IPV4/6.IPV6 format: **HostIP: "[fe80::1145:1400:1919:8100]"** +- **HostPort:** the port of the host, also the port to which the client will connect. The protocol is UDP. +- If you need to forward the port on top of the router, you only need to forward one of the above UDP ports. + +**EncoderSetting:** +- **bitRate:** bit rate (unit: bit; default: 196608) +- **frameRate:** frame rate (in FPS; default: 24) +- **maxFrameSize:** maximum single frame size (unit: bit; default: 8192) +- **ResolutionDivider:** Reduce the encoding resolution, i.e. the input window screen resolution. Does not affect the local display. Inputting 2 will divide the window's width and height by 2. (default: 2) + +**Too high bit rate and resolution will cause all kinds of lag and issues, it is recommended to divide the resolution by 3 and adjust the frame rate to less than 20 fps, which can solve the problem of compression mosaic and encoding lag to some extent.** ## ToDo --- diff --git a/README_zh.md b/README_zh.md index da11d9a..000f0ee 100644 --- a/README_zh.md +++ b/README_zh.md @@ -91,6 +91,23 @@ config.json 中的一些配置的参数只是下拉列表选项的顺序。 你可以使用控制器指针指向第三人称相机,并用手柄的抓取键将其放到你想要的位置。 +## 多人游玩设置 +--- + +- 所有的多人游玩相关的设置都在config.json里面。 +- **HostIP:** 客户端要连接的主机IP地址,支持IPV4/6。IPV6格式: **HostIP: "[fe80::1145:1400:1919:8100]"** +- **HostPort:** 主机的端口,也是客户端要连接的端口。协议为UDP。 +- 如果你需要在路由器上面转发端口,只需要转发上述的一个UDP端口即可。 + +EncoderSettin(编码设置): + +- **bitRate:** 比特率(单位:bit;默认:196608) +- **frameRate:** 帧率(单位:FPS;默认:24) +- **maxFrameSize:** 最大单帧大小(单位:bit;默认:8192) +- **ResolutionDivider:** 降低编码分辨率,也就是输入的窗口画面分辨。不影响本地端显示。输入2会将窗口的长宽分别除以2。(默认:2) + +**过高的码率和分辨率会造成各种的问题和卡顿,推荐将分辨率除以3帧率调整为20帧以下,可以一定程度上解决压缩马赛克,以及编码卡顿问题。** + ## ToDo --- - √ 添加用户可调整的设置(控制器位置等)