PredictionNetworkManager (disables Physics.autoSimulation

This commit is contained in:
mischa 2023-08-31 17:56:39 +02:00
parent d9ef6d855c
commit ffe8303494
4 changed files with 50 additions and 7 deletions

View File

@ -776,7 +776,7 @@ MonoBehaviour:
m_GameObject: {fileID: 1282001517} m_GameObject: {fileID: 1282001517}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8aab4c8111b7c411b9b92cf3dbc5bd4e, type: 3} m_Script: {fileID: 11500000, guid: bd0effdb85c1c400387afcc39e630acd, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
dontDestroyOnLoad: 1 dontDestroyOnLoad: 1

View File

@ -0,0 +1,19 @@
// prediction needs some custom setup.
// for example, we need to ensure Physics 'Auto Simulation' is disabled
// because we want to call Physics.Simulate() manually.
using UnityEngine;
namespace Mirror.Examples.BilliardsPredicted
{
public class PredictionNetworkManager : NetworkManager
{
public override void Awake()
{
// Ensure Physics 'Auto Simulation' is disabled when starting this scene
Physics.autoSimulation = false;
Debug.Log($"Prediction: disabled Physics Auto Simulation to prepare for manual Simulation steps.");
base.Awake();
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: bd0effdb85c1c400387afcc39e630acd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -18,7 +18,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334 shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0 shadowmaskMode: 0
blendWeights: 1 skinWeights: 1
textureQuality: 1 textureQuality: 1
anisotropicTextures: 0 anisotropicTextures: 0
antiAliasing: 0 antiAliasing: 0
@ -27,6 +27,7 @@ QualitySettings:
realtimeReflectionProbes: 0 realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0 billboardsFaceCameraPosition: 0
vSyncCount: 0 vSyncCount: 0
realtimeGICPUUsage: 25
lodBias: 0.3 lodBias: 0.3
maximumLODLevel: 0 maximumLODLevel: 0
streamingMipmapsActive: 0 streamingMipmapsActive: 0
@ -40,6 +41,7 @@ QualitySettings:
asyncUploadBufferSize: 4 asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1 asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1 resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: [] excludedTargetPlatforms: []
- serializedVersion: 2 - serializedVersion: 2
name: Low name: Low
@ -53,7 +55,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334 shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0 shadowmaskMode: 0
blendWeights: 2 skinWeights: 2
textureQuality: 0 textureQuality: 0
anisotropicTextures: 0 anisotropicTextures: 0
antiAliasing: 0 antiAliasing: 0
@ -62,6 +64,7 @@ QualitySettings:
realtimeReflectionProbes: 0 realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0 billboardsFaceCameraPosition: 0
vSyncCount: 0 vSyncCount: 0
realtimeGICPUUsage: 25
lodBias: 0.4 lodBias: 0.4
maximumLODLevel: 0 maximumLODLevel: 0
streamingMipmapsActive: 0 streamingMipmapsActive: 0
@ -75,6 +78,7 @@ QualitySettings:
asyncUploadBufferSize: 4 asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1 asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1 resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: [] excludedTargetPlatforms: []
- serializedVersion: 2 - serializedVersion: 2
name: Medium name: Medium
@ -88,7 +92,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334 shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0 shadowmaskMode: 0
blendWeights: 2 skinWeights: 2
textureQuality: 0 textureQuality: 0
anisotropicTextures: 1 anisotropicTextures: 1
antiAliasing: 0 antiAliasing: 0
@ -97,6 +101,7 @@ QualitySettings:
realtimeReflectionProbes: 0 realtimeReflectionProbes: 0
billboardsFaceCameraPosition: 0 billboardsFaceCameraPosition: 0
vSyncCount: 1 vSyncCount: 1
realtimeGICPUUsage: 25
lodBias: 0.7 lodBias: 0.7
maximumLODLevel: 0 maximumLODLevel: 0
streamingMipmapsActive: 0 streamingMipmapsActive: 0
@ -110,6 +115,7 @@ QualitySettings:
asyncUploadBufferSize: 4 asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1 asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1 resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: [] excludedTargetPlatforms: []
- serializedVersion: 2 - serializedVersion: 2
name: High name: High
@ -123,7 +129,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334 shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1 shadowmaskMode: 1
blendWeights: 2 skinWeights: 2
textureQuality: 0 textureQuality: 0
anisotropicTextures: 1 anisotropicTextures: 1
antiAliasing: 0 antiAliasing: 0
@ -132,6 +138,7 @@ QualitySettings:
realtimeReflectionProbes: 1 realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1 billboardsFaceCameraPosition: 1
vSyncCount: 1 vSyncCount: 1
realtimeGICPUUsage: 50
lodBias: 1 lodBias: 1
maximumLODLevel: 0 maximumLODLevel: 0
streamingMipmapsActive: 0 streamingMipmapsActive: 0
@ -145,6 +152,7 @@ QualitySettings:
asyncUploadBufferSize: 4 asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1 asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1 resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: [] excludedTargetPlatforms: []
- serializedVersion: 2 - serializedVersion: 2
name: Very High name: Very High
@ -158,7 +166,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334 shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1 shadowmaskMode: 1
blendWeights: 4 skinWeights: 4
textureQuality: 0 textureQuality: 0
anisotropicTextures: 2 anisotropicTextures: 2
antiAliasing: 2 antiAliasing: 2
@ -167,6 +175,7 @@ QualitySettings:
realtimeReflectionProbes: 1 realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1 billboardsFaceCameraPosition: 1
vSyncCount: 1 vSyncCount: 1
realtimeGICPUUsage: 50
lodBias: 1.5 lodBias: 1.5
maximumLODLevel: 0 maximumLODLevel: 0
streamingMipmapsActive: 0 streamingMipmapsActive: 0
@ -180,6 +189,7 @@ QualitySettings:
asyncUploadBufferSize: 4 asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1 asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1 resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: [] excludedTargetPlatforms: []
- serializedVersion: 2 - serializedVersion: 2
name: Ultra name: Ultra
@ -193,7 +203,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334 shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1 shadowmaskMode: 1
blendWeights: 4 skinWeights: 4
textureQuality: 0 textureQuality: 0
anisotropicTextures: 2 anisotropicTextures: 2
antiAliasing: 2 antiAliasing: 2
@ -202,6 +212,7 @@ QualitySettings:
realtimeReflectionProbes: 1 realtimeReflectionProbes: 1
billboardsFaceCameraPosition: 1 billboardsFaceCameraPosition: 1
vSyncCount: 1 vSyncCount: 1
realtimeGICPUUsage: 100
lodBias: 2 lodBias: 2
maximumLODLevel: 0 maximumLODLevel: 0
streamingMipmapsActive: 0 streamingMipmapsActive: 0
@ -215,6 +226,7 @@ QualitySettings:
asyncUploadBufferSize: 4 asyncUploadBufferSize: 4
asyncUploadPersistentBuffer: 1 asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1 resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: [] excludedTargetPlatforms: []
m_PerPlatformDefaultQuality: m_PerPlatformDefaultQuality:
Android: 2 Android: 2
@ -223,6 +235,7 @@ QualitySettings:
PS4: 5 PS4: 5
PSM: 5 PSM: 5
PSP2: 2 PSP2: 2
Server: 0
Standalone: 3 Standalone: 3
Tizen: 2 Tizen: 2
WebGL: 3 WebGL: 3