diff --git a/Assets/Models/RobotTestModel.fbx b/Assets/Models/RobotTestModel.fbx deleted file mode 100644 index af8ad6b..0000000 Binary files a/Assets/Models/RobotTestModel.fbx and /dev/null differ diff --git a/Assets/Models/RobotTestModel.fbx.meta b/Assets/Models/RobotTestModel.fbx.meta deleted file mode 100644 index 6c85f10..0000000 --- a/Assets/Models/RobotTestModel.fbx.meta +++ /dev/null @@ -1,147 +0,0 @@ -fileFormatVersion: 2 -guid: 68f975ad13142f649bdb7d103d57f656 -ModelImporter: - serializedVersion: 22200 - internalIDToNameTable: [] - externalObjects: - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: ArmMaterial - second: {fileID: 2100000, guid: 7a80a153100dcee4883c14cb45910792, type: 2} - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: BodyPart - second: {fileID: 2100000, guid: 44fd85b713b62114884f479a801d691e, type: 2} - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: BodyPart.001 - second: {fileID: 2100000, guid: fb4122f4a923e3c46b6d3a0ee94a46d4, type: 2} - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: BodyPartD - second: {fileID: 2100000, guid: d7052fe9a67424b40a89b2f0c92aee94, type: 2} - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: CableDetailMaterial - second: {fileID: 2100000, guid: dbdb83a1f181430479a5b8550d099c73, type: 2} - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: LegTexture - second: {fileID: 2100000, guid: 762ba59a2cbcbe74da302c098657d011, type: 2} - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: NeckDetails - second: {fileID: 2100000, guid: 9f5176c107a43c043ab8ce3a14a1a9c0, type: 2} - - first: - type: UnityEngine:Material - assembly: UnityEngine.CoreModule - name: RobotHeadMaterial - second: {fileID: 2100000, guid: b2038a6b0830e2b42b4cbad1bc3fd848, type: 2} - materials: - materialImportMode: 2 - materialName: 0 - materialSearch: 1 - materialLocation: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - removeConstantScaleCurves: 0 - motionNodeName: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: [] - isReadable: 0 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 - importPhysicalCameras: 1 - importVisibility: 1 - importBlendShapes: 1 - importCameras: 1 - importLights: 1 - nodeNameCollisionStrategy: 1 - fileIdsGeneration: 2 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - keepQuads: 0 - weldVertices: 1 - bakeAxisConversion: 0 - preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - optimizeBones: 1 - meshOptimizationFlags: -1 - indexFormat: 0 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVMarginMethod: 1 - secondaryUVMinLightmapResolution: 40 - secondaryUVMinObjectScale: 1 - secondaryUVPackMargin: 4 - useFileScale: 1 - strictVertexDataChecks: 0 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] - importAnimation: 1 - humanDescription: - serializedVersion: 3 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - globalScale: 1 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - autoGenerateAvatarMappingIfUnspecified: 1 - animationType: 2 - humanoidOversampling: 1 - avatarSetup: 0 - addHumanoidExtraRootOnlyWhenUsingAvatar: 1 - importBlendShapeDeformPercent: 1 - remapMaterialsIfMaterialImportModeIsNone: 0 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Models/SpeedFireModels.fbx b/Assets/Models/SpeedFireModels.fbx deleted file mode 100644 index 74de2ae..0000000 Binary files a/Assets/Models/SpeedFireModels.fbx and /dev/null differ diff --git a/Assets/Models/SpeedFireModels.fbx.meta b/Assets/Models/SpeedFireModels.fbx.meta deleted file mode 100644 index b0aa677..0000000 --- a/Assets/Models/SpeedFireModels.fbx.meta +++ /dev/null @@ -1,107 +0,0 @@ -fileFormatVersion: 2 -guid: b5e8b9c441024a5488ac81ee138cb2d0 -ModelImporter: - serializedVersion: 22200 - internalIDToNameTable: [] - externalObjects: {} - materials: - materialImportMode: 2 - materialName: 0 - materialSearch: 1 - materialLocation: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - removeConstantScaleCurves: 0 - motionNodeName: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: [] - isReadable: 0 - meshes: - lODScreenPercentages: [] - globalScale: 1 - meshCompression: 0 - addColliders: 0 - useSRGBMaterialColor: 1 - sortHierarchyByName: 1 - importPhysicalCameras: 1 - importVisibility: 1 - importBlendShapes: 1 - importCameras: 1 - importLights: 1 - nodeNameCollisionStrategy: 1 - fileIdsGeneration: 2 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - keepQuads: 0 - weldVertices: 1 - bakeAxisConversion: 0 - preserveHierarchy: 0 - skinWeightsMode: 0 - maxBonesPerVertex: 4 - minBoneWeight: 0.001 - optimizeBones: 1 - meshOptimizationFlags: -1 - indexFormat: 0 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVMarginMethod: 1 - secondaryUVMinLightmapResolution: 40 - secondaryUVMinObjectScale: 1 - secondaryUVPackMargin: 4 - useFileScale: 1 - strictVertexDataChecks: 0 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - referencedClips: [] - importAnimation: 1 - humanDescription: - serializedVersion: 3 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - globalScale: 1 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - autoGenerateAvatarMappingIfUnspecified: 1 - animationType: 2 - humanoidOversampling: 1 - avatarSetup: 0 - addHumanoidExtraRootOnlyWhenUsingAvatar: 1 - importBlendShapeDeformPercent: 1 - remapMaterialsIfMaterialImportModeIsNone: 0 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/BuilderStaff.meta b/Assets/Prefabs/BuilderStaff.meta deleted file mode 100644 index 8082ab2..0000000 --- a/Assets/Prefabs/BuilderStaff.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c52551b0db5fbad43b1cae7d273fda1f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/EngineerStaff.meta b/Assets/Prefabs/EngineerStaff.meta deleted file mode 100644 index 77f0583..0000000 --- a/Assets/Prefabs/EngineerStaff.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fae87c08bd5b59941ad59fafbd8a4027 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Runtime/NetworkManagerUI.cs b/Assets/Scripts/Runtime/NetworkManagerUI.cs deleted file mode 100644 index aa3a47d..0000000 --- a/Assets/Scripts/Runtime/NetworkManagerUI.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Unity.Netcode; -using UnityEngine; -using UnityEngine.UI; - -public class NetworkManagerUI : MonoBehaviour -{ - [SerializeField] private Button serverBtn; - [SerializeField] private Button hostBtn; - [SerializeField] private Button clientBtn; - - private void Awake(){ - serverBtn.onClick.AddListener(() =>{ - NetworkManager.Singleton.StartServer(); - }); - hostBtn.onClick.AddListener(() =>{ - NetworkManager.Singleton.StartHost(); - }); - clientBtn.onClick.AddListener(() =>{ - NetworkManager.Singleton.StartClient(); - }); - } -} diff --git a/Assets/Scripts/Runtime/Networking/NetworkManagerUI.cs b/Assets/Scripts/Runtime/Networking/NetworkManagerUI.cs new file mode 100644 index 0000000..64221ce --- /dev/null +++ b/Assets/Scripts/Runtime/Networking/NetworkManagerUI.cs @@ -0,0 +1,62 @@ +using Unity.Netcode; +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.UI; + +public class NetworkManagerUI : MonoBehaviour +{ + // [SerializeField] private Button serverBtn; + [SerializeField] private Button _hostBtn; + [SerializeField] private Button _clientBtn; + + [SerializeField] + private string _sceneName; + + private void Awake(){ + // serverBtn.onClick.AddListener(() =>{ + // StartServerAndLoadScene(); + // }); + _hostBtn.onClick.AddListener(() =>{ + StartHostAndLoadScene(); + }); + _clientBtn.onClick.AddListener(() =>{ + NetworkManager.Singleton.StartClient(); + }); + } + + private void StartServerAndLoadScene() + { + if (NetworkManager.Singleton.StartServer()) + { + Debug.Log("Server started successfully."); + NetworkManager.Singleton.SceneManager.LoadScene(_sceneName, LoadSceneMode.Single); + } + else + { + Debug.LogError("Failed to start server!"); + } + } + + private void StartHostAndLoadScene() + { + // Start the host + if (NetworkManager.Singleton.StartHost()) + { + Debug.Log("Host started successfully."); + NetworkManager.Singleton.SceneManager.LoadScene(_sceneName, LoadSceneMode.Single); + } + else + { + Debug.LogError("Failed to start host!"); + } + } + + private void LoadScene(string sceneName) + { + if (!SceneManager.GetSceneByName(sceneName).isLoaded) + { + // Use NetworkSceneManager to load the scene + NetworkManager.Singleton.SceneManager.LoadScene(sceneName, LoadSceneMode.Single); + } + } +} diff --git a/Assets/Scripts/Runtime/NetworkManagerUI.cs.meta b/Assets/Scripts/Runtime/Networking/NetworkManagerUI.cs.meta similarity index 100% rename from Assets/Scripts/Runtime/NetworkManagerUI.cs.meta rename to Assets/Scripts/Runtime/Networking/NetworkManagerUI.cs.meta diff --git a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset index 867f9cb..aa8e022 100644 --- a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset +++ b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset @@ -33,24 +33,24 @@ MonoBehaviour: m_Settings: m_SettingsList: m_List: - - rid: 1661345747576030116 - - rid: 1661345747576030117 + - rid: 1661346043388231691 + - rid: 1661346043388231692 - rid: 6852985685364965378 - rid: 6852985685364965379 - rid: 6852985685364965380 - rid: 6852985685364965381 - - rid: 1661345747576030118 - - rid: 1661345747576030119 + - rid: 1661346043388231693 + - rid: 1661346043388231694 - rid: 6852985685364965384 - rid: 6852985685364965385 - - rid: 1661345747576030120 - - rid: 1661345747576030121 - - rid: 1661345747576030122 - - rid: 1661345747576030123 - - rid: 1661345747576030124 - - rid: 1661345747576030125 + - rid: 1661346043388231695 + - rid: 1661346043388231696 + - rid: 1661346043388231697 + - rid: 1661346043388231698 + - rid: 1661346043388231699 + - rid: 1661346043388231700 - rid: 6852985685364965392 - - rid: 1661345747576030126 + - rid: 1661346043388231701 - rid: 6852985685364965394 - rid: 8712630790384254976 - rid: 1517640095335972864 @@ -102,14 +102,14 @@ MonoBehaviour: 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: 1661345747576030116 + - rid: 1661346043388231691 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: 1661345747576030117 + - rid: 1661346043388231692 type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3} @@ -121,7 +121,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: 1661345747576030118 + - rid: 1661346043388231693 type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_Version: 0 @@ -136,7 +136,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: 1661345747576030119 + - rid: 1661346043388231694 type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} @@ -144,7 +144,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: 1661345747576030120 + - rid: 1661346043388231695 type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime} data: m_Version: 0 @@ -157,13 +157,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: 1661345747576030121 + - rid: 1661346043388231696 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: 1661345747576030122 + - rid: 1661346043388231697 type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 @@ -176,12 +176,12 @@ MonoBehaviour: skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} - - rid: 1661345747576030123 + - rid: 1661346043388231698 type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 m_ProbeVolumeDisableStreamingAssets: 0 - - rid: 1661345747576030124 + - rid: 1661346043388231699 type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1 @@ -191,14 +191,14 @@ MonoBehaviour: probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3} probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3} numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3} - - rid: 1661345747576030125 + - rid: 1661346043388231700 type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_version: 0 m_IncludeReferencedInScenes: 0 m_IncludeAssetsByLabel: 0 m_LabelToInclude: - - rid: 1661345747576030126 + - rid: 1661346043388231701 type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} data: m_Version: 1