feat: update render pipeline settings and networking scripts

Update Universal Render Pipeline settings to use new resource IDs for 
various rendering components. Remove deprecated resource entries to 
streamline the settings file. Add missing transport namespace inNetworkManagerUI script to proper functionality of network 
features.
This commit is contained in:
Константин Адер 2025-01-26 04:04:31 +03:00
parent a360bf8fe0
commit f76e155d88
2 changed files with 46 additions and 33 deletions

View File

@ -1,4 +1,5 @@
using Unity.Netcode;
using Unity.Netcode.Transports.UTP;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
@ -20,7 +21,7 @@ public class NetworkManagerUI : MonoBehaviour
StartHostAndLoadScene();
});
_clientBtn.onClick.AddListener(() =>{
NetworkManager.Singleton.StartClient();
ConnectToServer();
});
}
@ -51,12 +52,24 @@ public class NetworkManagerUI : MonoBehaviour
}
}
private void LoadScene(string sceneName)
private void ConnectToServer()
{
if (!SceneManager.GetSceneByName(sceneName).isLoaded)
// Set the server IP and port
UnityTransport transport = NetworkManager.Singleton.GetComponent<UnityTransport>();
if (transport != null)
{
// Use NetworkSceneManager to load the scene
NetworkManager.Singleton.SceneManager.LoadScene(sceneName, LoadSceneMode.Single);
transport.SetConnectionData("127.0.0.1", 7777);
}
// Start the client
if (NetworkManager.Singleton.StartClient())
{
Debug.Log("Client started successfully.");
}
else
{
Debug.LogError("Failed to start client!");
}
}
}

View File

@ -33,24 +33,24 @@ MonoBehaviour:
m_Settings:
m_SettingsList:
m_List:
- rid: 1661346043388231691
- rid: 1661346043388231692
- rid: 596322919513325988
- rid: 596322919513325989
- rid: 6852985685364965378
- rid: 6852985685364965379
- rid: 6852985685364965380
- rid: 6852985685364965381
- rid: 1661346043388231693
- rid: 1661346043388231694
- rid: 596322919513325990
- rid: 596322919513325991
- rid: 6852985685364965384
- rid: 6852985685364965385
- rid: 1661346043388231695
- rid: 1661346043388231696
- rid: 1661346043388231697
- rid: 1661346043388231698
- rid: 1661346043388231699
- rid: 1661346043388231700
- rid: 596322919513325992
- rid: 596322919513325993
- rid: 596322919513325994
- rid: 596322919513325995
- rid: 596322919513325996
- rid: 596322919513325997
- rid: 6852985685364965392
- rid: 1661346043388231701
- rid: 596322919513325998
- rid: 6852985685364965394
- rid: 8712630790384254976
- rid: 1517640095335972864
@ -96,20 +96,14 @@ MonoBehaviour:
references:
version: 2
RefIds:
- rid: 1517640095335972864
type: {class: UniversalRenderPipelineRuntimeXRResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_xrOcclusionMeshPS: {fileID: 4800000, guid: 4431b1f1f743fbf4eb310a967890cbea, type: 3}
m_xrMirrorViewPS: {fileID: 4800000, guid: d5a307c014552314b9f560906d708772, type: 3}
m_xrMotionVector: {fileID: 4800000, guid: f89aac1e4f84468418fe30e611dff395, type: 3}
- rid: 1661346043388231691
- rid: 596322919513325988
type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
m_StripUnusedPostProcessingVariants: 1
m_StripUnusedVariants: 1
m_StripScreenCoordOverrideVariants: 1
- rid: 1661346043388231692
- rid: 596322919513325989
type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
@ -121,7 +115,7 @@ MonoBehaviour:
m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3}
m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3}
m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3}
- rid: 1661346043388231693
- rid: 596322919513325990
type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
@ -136,7 +130,7 @@ MonoBehaviour:
m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2}
- rid: 1661346043388231694
- rid: 596322919513325991
type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
@ -144,7 +138,7 @@ MonoBehaviour:
m_DefaultLineMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2}
m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2}
m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2}
- rid: 1661346043388231695
- rid: 596322919513325992
type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime}
data:
m_Version: 0
@ -157,13 +151,13 @@ MonoBehaviour:
m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3}
m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3}
m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3}
- rid: 1661346043388231696
- rid: 596322919513325993
type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3}
m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3}
m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3}
- rid: 1661346043388231697
- rid: 596322919513325994
type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -176,12 +170,12 @@ MonoBehaviour:
skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3}
renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
- rid: 1661346043388231698
- rid: 596322919513325995
type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
m_ProbeVolumeDisableStreamingAssets: 0
- rid: 1661346043388231699
- rid: 596322919513325996
type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -191,20 +185,26 @@ MonoBehaviour:
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3}
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3}
numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3}
- rid: 1661346043388231700
- rid: 596322919513325997
type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_version: 0
m_IncludeReferencedInScenes: 0
m_IncludeAssetsByLabel: 0
m_LabelToInclude:
- rid: 1661346043388231701
- rid: 596322919513325998
type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
probeVolumeBlendStatesCS: {fileID: 7200000, guid: a3f7b8c99de28a94684cb1daebeccf5d, type: 3}
probeVolumeUploadDataCS: {fileID: 7200000, guid: 0951de5992461754fa73650732c4954c, type: 3}
probeVolumeUploadDataL2CS: {fileID: 7200000, guid: 6196f34ed825db14b81fb3eb0ea8d931, type: 3}
- rid: 1517640095335972864
type: {class: UniversalRenderPipelineRuntimeXRResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_xrOcclusionMeshPS: {fileID: 4800000, guid: 4431b1f1f743fbf4eb310a967890cbea, type: 3}
m_xrMirrorViewPS: {fileID: 4800000, guid: d5a307c014552314b9f560906d708772, type: 3}
m_xrMotionVector: {fileID: 4800000, guid: f89aac1e4f84468418fe30e611dff395, type: 3}
- rid: 6852985685364965378
type: {class: UniversalRendererResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data: