adding multiplayer
This commit is contained in:
@@ -21,12 +21,6 @@ MonoBehaviour:
|
||||
m_SerializedLabels:
|
||||
- world
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a732f125f8c344a46917f07872c35378
|
||||
m_Address: Assets/jelycho/MainMenu/world_main_menu.asset
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- world
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: abb7fe7f372ba7640b0ab138239c7f78
|
||||
m_Address: Assets/jelycho/Main/scn_main_menu.unity
|
||||
m_ReadOnly: 0
|
||||
|
||||
@@ -14,13 +14,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_GroupName: game_mode_standard
|
||||
m_GUID: a82cff5173833a74787dcac593fe2379
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 09a952812a536084d8f3cd13dc9fec09
|
||||
m_Address: gm_standard
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels:
|
||||
- game_mode
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_SerializeEntries: []
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 93969247b34433f44bfa755967945828, type: 2}
|
||||
m_SchemaSet:
|
||||
|
||||
Binary file not shown.
31
Assets/DefaultNetworkPrefabs.asset
Normal file
31
Assets/DefaultNetworkPrefabs.asset
Normal file
@@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e651dbb3fbac04af2b8f5abf007ddc23, type: 3}
|
||||
m_Name: DefaultNetworkPrefabs
|
||||
m_EditorClassIdentifier:
|
||||
IsDefault: 1
|
||||
List:
|
||||
- Override: 0
|
||||
Prefab: {fileID: 6202808672838313896, guid: d15ca0257a10a034e826a60fba11989b, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
- Override: 0
|
||||
Prefab: {fileID: 4105802788753539860, guid: 04a34e58b066c014eaaeb846b2bd3213, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
- Override: 0
|
||||
Prefab: {fileID: 6086846679135428685, guid: be292ae0883a3be4090cdc42a4c7c131, type: 3}
|
||||
SourcePrefabToOverride: {fileID: 0}
|
||||
SourceHashToOverride: 0
|
||||
OverridingTargetPrefab: {fileID: 0}
|
||||
2
Assets/jelycho/MainMenu/world_main_menu.asset.meta → Assets/DefaultNetworkPrefabs.asset.meta
Executable file → Normal file
2
Assets/jelycho/MainMenu/world_main_menu.asset.meta → Assets/DefaultNetworkPrefabs.asset.meta
Executable file → Normal file
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a732f125f8c344a46917f07872c35378
|
||||
guid: d30094ba881a39a4197e324b492d5db7
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
Submodule Assets/RebootKit updated: 5a813f212c...e5616474f1
@@ -14,15 +14,11 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
initializeOnLoad: 1
|
||||
coreServices: {fileID: 11400000, guid: f075fa2d60632ae4f9449445a2b794fa, type: 2}
|
||||
services: []
|
||||
gameAsset: {fileID: 11400000, guid: 86b2e13dcab64314e8c5b56c17a956d3, type: 2}
|
||||
appConfig:
|
||||
mainMenuConfig:
|
||||
scene:
|
||||
m_AssetGUID: abb7fe7f372ba7640b0ab138239c7f78
|
||||
m_SubObjectName:
|
||||
m_SubObjectGUID:
|
||||
m_SubObjectType:
|
||||
m_EditorAssetChanged: 0
|
||||
gameConfig:
|
||||
defaultGameMode: {fileID: 11400000, guid: d457791f1b0a8474596c4cd60000debf, type: 2}
|
||||
gamePrefab: {fileID: 7133476019135208936, guid: 04a34e58b066c014eaaeb846b2bd3213, type: 3}
|
||||
mainMenuScene:
|
||||
m_AssetGUID: abb7fe7f372ba7640b0ab138239c7f78
|
||||
m_SubObjectName:
|
||||
m_SubObjectGUID:
|
||||
m_SubObjectType:
|
||||
m_EditorAssetChanged: 0
|
||||
steamAppID: 480
|
||||
|
||||
2
Assets/jelycho/GameModes.meta → Assets/Settings/PlayMode.meta
Executable file → Normal file
2
Assets/jelycho/GameModes.meta → Assets/Settings/PlayMode.meta
Executable file → Normal file
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1978d676c19f4164d9a5fb72685a1b41
|
||||
guid: 9e044dd355e2bb44a805a56e9b76f26a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
46
Assets/Settings/PlayMode/Two players test.asset
Normal file
46
Assets/Settings/PlayMode/Two players test.asset
Normal file
@@ -0,0 +1,46 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a689d91966dfb46499fb63f130d9b905, type: 3}
|
||||
m_Name: Two players test
|
||||
m_EditorClassIdentifier:
|
||||
m_Description:
|
||||
m_EnableEditors: 1
|
||||
m_MainEditorInstance:
|
||||
Name: Main Editor
|
||||
<CorrespondingNodeId>k__BackingField: Main Editor|0_run
|
||||
m_Nodes:
|
||||
- Main Editor|0_run
|
||||
- Main Editor|0_deploy
|
||||
m_PlayerTag:
|
||||
m_InitialScene: {fileID: 0}
|
||||
m_EditorInstances:
|
||||
- Name: Player 2
|
||||
<CorrespondingNodeId>k__BackingField: Player 2|1_run
|
||||
m_Nodes:
|
||||
- Player 2|1_run
|
||||
- Player 2|1_deploy
|
||||
m_PlayerTag:
|
||||
m_InitialScene: {fileID: 0}
|
||||
m_AdvancedConfiguration:
|
||||
StreamLogsToMainEditor: 0
|
||||
LogsColor: {r: 0.3643, g: 0.581, b: 0.8679, a: 1}
|
||||
m_LocalInstances: []
|
||||
m_RemoteInstances: []
|
||||
m_OverridePort: 0
|
||||
m_Port: 0
|
||||
m_MainEditorInstanceObsolete:
|
||||
rid: -2
|
||||
references:
|
||||
version: 2
|
||||
RefIds:
|
||||
- rid: -2
|
||||
type: {class: , ns: , asm: }
|
||||
2
Assets/jelycho/GameModes/standard/gm_standard.asset.meta → Assets/Settings/PlayMode/Two players test.asset.meta
Executable file → Normal file
2
Assets/jelycho/GameModes/standard/gm_standard.asset.meta → Assets/Settings/PlayMode/Two players test.asset.meta
Executable file → Normal file
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09a952812a536084d8f3cd13dc9fec09
|
||||
guid: f251289f6eaede64c93818c443c26bdc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
@@ -33,28 +33,28 @@ MonoBehaviour:
|
||||
m_Settings:
|
||||
m_SettingsList:
|
||||
m_List:
|
||||
- rid: 7613102626737487978
|
||||
- rid: 7613102626737487979
|
||||
- rid: 7613102744023597192
|
||||
- rid: 7613102744023597193
|
||||
- rid: 6852985685364965378
|
||||
- rid: 6852985685364965379
|
||||
- rid: 6852985685364965380
|
||||
- rid: 6852985685364965381
|
||||
- rid: 7613102626737487980
|
||||
- rid: 7613102626737487981
|
||||
- rid: 7613102744023597194
|
||||
- rid: 7613102744023597195
|
||||
- rid: 6852985685364965384
|
||||
- rid: 6852985685364965385
|
||||
- rid: 7613102626737487982
|
||||
- rid: 7613102626737487983
|
||||
- rid: 7613102626737487984
|
||||
- rid: 7613102626737487985
|
||||
- rid: 7613102626737487986
|
||||
- rid: 7613102626737487987
|
||||
- rid: 7613102744023597196
|
||||
- rid: 7613102744023597197
|
||||
- rid: 7613102744023597198
|
||||
- rid: 7613102744023597199
|
||||
- rid: 7613102744023597200
|
||||
- rid: 7613102744023597201
|
||||
- rid: 6852985685364965392
|
||||
- rid: 7613102626737487988
|
||||
- rid: 7613102744023597202
|
||||
- rid: 6852985685364965394
|
||||
- rid: 8712630790384254976
|
||||
- rid: 260979669776728064
|
||||
- rid: 7613102626737487989
|
||||
- rid: 7613102744023597203
|
||||
m_RuntimeSettings:
|
||||
m_List:
|
||||
- rid: 6852985685364965378
|
||||
@@ -159,14 +159,14 @@ MonoBehaviour:
|
||||
m_version: 0
|
||||
m_EnableCompilationCaching: 1
|
||||
m_EnableValidityChecks: 1
|
||||
- rid: 7613102626737487978
|
||||
- rid: 7613102744023597192
|
||||
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: 7613102626737487979
|
||||
- rid: 7613102744023597193
|
||||
type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
|
||||
@@ -178,7 +178,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: 7613102626737487980
|
||||
- rid: 7613102744023597194
|
||||
type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_Version: 0
|
||||
@@ -193,7 +193,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: 7613102626737487981
|
||||
- rid: 7613102744023597195
|
||||
type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
|
||||
@@ -202,7 +202,7 @@ MonoBehaviour:
|
||||
m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2}
|
||||
m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2}
|
||||
m_DefaultSpriteMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
|
||||
- rid: 7613102626737487982
|
||||
- rid: 7613102744023597196
|
||||
type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime}
|
||||
data:
|
||||
m_Version: 0
|
||||
@@ -215,13 +215,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: 7613102626737487983
|
||||
- rid: 7613102744023597197
|
||||
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: 7613102626737487984
|
||||
- rid: 7613102744023597198
|
||||
type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
@@ -234,12 +234,12 @@ MonoBehaviour:
|
||||
skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3}
|
||||
renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
|
||||
renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
|
||||
- rid: 7613102626737487985
|
||||
- rid: 7613102744023597199
|
||||
type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
m_ProbeVolumeDisableStreamingAssets: 0
|
||||
- rid: 7613102626737487986
|
||||
- rid: 7613102744023597200
|
||||
type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_Version: 1
|
||||
@@ -249,21 +249,21 @@ MonoBehaviour:
|
||||
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3}
|
||||
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3}
|
||||
numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3}
|
||||
- rid: 7613102626737487987
|
||||
- rid: 7613102744023597201
|
||||
type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
|
||||
data:
|
||||
m_version: 0
|
||||
m_IncludeReferencedInScenes: 0
|
||||
m_IncludeAssetsByLabel: 0
|
||||
m_LabelToInclude:
|
||||
- rid: 7613102626737487988
|
||||
- rid: 7613102744023597202
|
||||
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: 7613102626737487989
|
||||
- rid: 7613102744023597203
|
||||
type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
|
||||
data:
|
||||
m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using RebootKit.Engine.Simulation;
|
||||
using RebootReality.jelycho.Main;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -13,7 +14,7 @@ namespace RebootReality.jelycho.Abilities {
|
||||
public void RemoveAbility(AbilityEffect ability) {
|
||||
}
|
||||
|
||||
public override void OnTick(float deltaTime) {
|
||||
public override void Tick(float deltaTime) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using RebootKit.Engine.Simulation;
|
||||
|
||||
namespace RebootReality.jelycho.Beacons {
|
||||
public class BeaconActor : Actor {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using RebootKit.Engine.Simulation;
|
||||
using RebootReality.jelycho.Main;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2eebc735c0624eadb3b5fc5a7cc611d7
|
||||
timeCreated: 1746878778
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 408f07fbb2a14c019e5fc3324a24454c
|
||||
timeCreated: 1746878783
|
||||
@@ -1,59 +0,0 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using RebootKit.Engine.Foundation;
|
||||
using RebootKit.Engine.Main;
|
||||
using RebootKit.Engine.Services.GameMode;
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using RebootReality.jelycho.Player;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace RebootReality.jelycho.GameMode.Standard {
|
||||
public class StandardGameMode : IGameMode {
|
||||
[Serializable]
|
||||
public class Config {
|
||||
public PlayerControllerAsset playerControllerAsset;
|
||||
public AssetReferenceGameObject playerPrefab;
|
||||
|
||||
public WorldConfigAsset worldConfig;
|
||||
}
|
||||
|
||||
Config m_Config;
|
||||
|
||||
[Inject] DIContext m_DIContext;
|
||||
|
||||
CancellationTokenSource m_DisposeCancellationTokenSource = new CancellationTokenSource();
|
||||
|
||||
ControllersManager<IController> m_ControllersManager;
|
||||
PlayerController m_PlayerController;
|
||||
|
||||
public StandardGameMode(Config config) {
|
||||
m_Config = config;
|
||||
|
||||
m_ControllersManager = new ControllersManager<IController>(m_DisposeCancellationTokenSource.Token);
|
||||
}
|
||||
|
||||
public async UniTask OnInit(CancellationToken cancellationToken) {
|
||||
await RR.World.LoadAsync(m_Config.worldConfig.Config, cancellationToken);
|
||||
|
||||
m_ControllersManager.Add(m_Config.playerControllerAsset);
|
||||
m_PlayerController = m_ControllersManager.Get<PlayerController>();
|
||||
}
|
||||
|
||||
public void OnStart() {
|
||||
m_ControllersManager.Start(m_DisposeCancellationTokenSource.Token).Forget();
|
||||
}
|
||||
|
||||
public void OnStop() {
|
||||
m_ControllersManager.Stop();
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
m_DisposeCancellationTokenSource.Cancel();
|
||||
}
|
||||
|
||||
public void OnTick() {
|
||||
m_ControllersManager.Tick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83af58c3064e420687c37222c18c472e
|
||||
timeCreated: 1746878772
|
||||
@@ -1,14 +0,0 @@
|
||||
using RebootKit.Engine.Services.GameMode;
|
||||
using RebootReality.jelycho.Main;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RebootReality.jelycho.GameMode.Standard {
|
||||
[CreateAssetMenu(menuName = GameConsts.k_AddComponentMenu + "Game Modes/Standard")]
|
||||
public class StandardGameModeAsset : GameModeAsset {
|
||||
[SerializeField] StandardGameMode.Config m_Config;
|
||||
|
||||
public override IGameMode Create() {
|
||||
return new StandardGameMode(m_Config);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a6162ffd783458ba697dcc1e1c40bea
|
||||
timeCreated: 1746879123
|
||||
@@ -1,150 +1,168 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using R3;
|
||||
using System.Collections.Generic;
|
||||
using RebootKit.Engine.Main;
|
||||
using RebootKit.Engine.Services.Console;
|
||||
using RebootKit.Engine.Services.Crosshair;
|
||||
using RebootKit.Engine.Services.GameMode;
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using RebootReality.jelycho.Player;
|
||||
using Unity.Collections;
|
||||
using Unity.Netcode;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Assertions;
|
||||
using Logger = RebootKit.Engine.Foundation.Logger;
|
||||
|
||||
namespace RebootReality.jelycho.Main {
|
||||
public static class JelychoConsoleCommands {
|
||||
[RCCMD("start", "Starts game mode with given name. Usage: start <game_mode_name> <world_name>")]
|
||||
public static void StartGameMode(string[] args) {
|
||||
if (args.Length != 3) {
|
||||
RR.Console.WriteToOutput($"Usage: {args[0]} <game_mode_name> <world_name>");
|
||||
class PlayerState : INetworkSerializable {
|
||||
public ulong clientID;
|
||||
|
||||
public PlayerController Controller;
|
||||
public PlayerActor Actor;
|
||||
|
||||
public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter { }
|
||||
}
|
||||
|
||||
public class JelychoGame : Game {
|
||||
static readonly Logger s_Logger = new Logger(nameof(JelychoGame));
|
||||
|
||||
[SerializeField] PlayerController m_PlayerControllerPrefab;
|
||||
[SerializeField] PlayerActor m_PlayerActorPrefab;
|
||||
[SerializeField] string m_MainWorldID = "dev";
|
||||
|
||||
List<PlayerState> m_PlayerStates = new List<PlayerState>();
|
||||
|
||||
void Awake() { }
|
||||
|
||||
public override void OnDestroy() {
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
public override void OnNetworkSpawn() {
|
||||
base.OnNetworkSpawn();
|
||||
|
||||
NetworkManager.Singleton.OnClientConnectedCallback += OnClientConnected;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback += OnClientStopped;
|
||||
}
|
||||
|
||||
public override void OnNetworkDespawn() {
|
||||
base.OnNetworkDespawn();
|
||||
|
||||
NetworkManager.Singleton.OnClientConnectedCallback -= OnClientConnected;
|
||||
NetworkManager.Singleton.OnClientDisconnectCallback -= OnClientStopped;
|
||||
}
|
||||
|
||||
void OnClientConnected(ulong clientID) {
|
||||
s_Logger.Info($"Client {clientID} connected");
|
||||
|
||||
if (IsServer) {
|
||||
s_Logger.Info($"Creating player state for client {clientID}");
|
||||
|
||||
PlayerController controller = Instantiate(m_PlayerControllerPrefab);
|
||||
controller.name = $"PlayerController_{clientID}";
|
||||
controller.NetworkObject.SpawnAsPlayerObject(clientID);
|
||||
|
||||
m_PlayerStates.Add(new PlayerState {
|
||||
clientID = clientID,
|
||||
Controller = controller,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void OnClientStopped(ulong clientID) {
|
||||
s_Logger.Info($"Client {clientID} disconnected");
|
||||
|
||||
if (IsServer) {
|
||||
for (int i = m_PlayerStates.Count - 1; i >= 0; i--) {
|
||||
if (m_PlayerStates[i].clientID == clientID) {
|
||||
s_Logger.Info($"Removing player state for client {clientID}");
|
||||
m_PlayerStates.RemoveAtSwapBack(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnWorldLoaded() {
|
||||
base.OnWorldLoaded();
|
||||
|
||||
OnPlayerReadyRpc(NetworkManager.Singleton.LocalClientId);
|
||||
}
|
||||
|
||||
[Rpc(SendTo.Server)]
|
||||
void OnPlayerReadyRpc(ulong clientID) {
|
||||
if (!IsServer) {
|
||||
return;
|
||||
}
|
||||
|
||||
string worldName = args[2];
|
||||
WorldConfigAsset worldConfig = RR.WorldConfigsAssets.FirstOrDefault(t => t.Config.name.Equals(worldName));
|
||||
if (worldConfig is null) {
|
||||
RR.Console.WriteToOutput($"World '{worldName}' not found");
|
||||
return;
|
||||
}
|
||||
PlayerActor actor = Instantiate(m_PlayerActorPrefab);
|
||||
actor.name = $"PlayerActor_{clientID}";
|
||||
actor.NetworkObject.SpawnAsPlayerObject(clientID);
|
||||
|
||||
foreach (GameModeAsset gameModeAsset in RR.GameModesAssets) {
|
||||
if (gameModeAsset.name == args[1]) {
|
||||
RR.Console.WriteToOutput($"Starting game mode '{gameModeAsset.name}'");
|
||||
RR.StartGameMode(gameModeAsset, worldConfig.Config);
|
||||
return;
|
||||
PlayerState playerState = GetPlayerState(clientID);
|
||||
Assert.IsNotNull(playerState);
|
||||
playerState.Actor = actor;
|
||||
playerState.Controller.SetActorClientRpc(actor.NetworkObjectId);
|
||||
}
|
||||
|
||||
PlayerState GetPlayerState(ulong clientID) {
|
||||
foreach (PlayerState state in m_PlayerStates) {
|
||||
if (state.clientID == clientID) {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
RR.Console.WriteToOutput($"Game mode '{args[1]}' not found");
|
||||
s_Logger.Error($"Player state for client {clientID} not found");
|
||||
return null;
|
||||
}
|
||||
|
||||
[RCCMD("gamemodes", "Lists all game modes")]
|
||||
public static void GameModes(string[] args) {
|
||||
if (args.Length != 1) {
|
||||
RR.Console.WriteToOutput($"Usage: {args[0]}");
|
||||
return;
|
||||
}
|
||||
public override void OnWorldUnload() {
|
||||
base.OnWorldUnload();
|
||||
|
||||
RR.Console.WriteToOutput("Game modes:");
|
||||
foreach (GameModeAsset gameModeAsset in RR.GameModesAssets) {
|
||||
RR.Console.WriteToOutput($" {gameModeAsset.name}");
|
||||
}
|
||||
if (IsServer) { }
|
||||
}
|
||||
}
|
||||
|
||||
public static class JelychoConsoleCommands {
|
||||
[RCCMD("worlds", "Lists all worlds")]
|
||||
public static void Worlds(string[] args) {
|
||||
if (args.Length != 1) {
|
||||
RR.Console.WriteToOutput($"Usage: {args[0]}");
|
||||
RR.WriteToConsole($"Usage: {args[0]}");
|
||||
return;
|
||||
}
|
||||
|
||||
RR.Console.WriteToOutput("Worlds:");
|
||||
RR.WriteToConsole("Worlds:");
|
||||
foreach (WorldConfigAsset worldConfigAsset in RR.WorldConfigsAssets) {
|
||||
RR.Console.WriteToOutput($" {worldConfigAsset.Config.name}");
|
||||
RR.WriteToConsole($" {worldConfigAsset.Config.name}");
|
||||
}
|
||||
}
|
||||
|
||||
[RCCMD("connect", "Connects to a server with given Steam ID. Usage: connect <steam_id>")]
|
||||
public static void ConnectToServer(string[] args) {
|
||||
RR.Console.WriteToOutput("Connecting to server...");
|
||||
|
||||
if (args.Length != 1) {
|
||||
RR.Console.WriteToOutput($"Usage: {args[0]} <steam_id>");
|
||||
if (args.Length < 1 || args.Length > 2) {
|
||||
RR.WriteToConsole($"Usage: {args[0]} <steam_id>");
|
||||
return;
|
||||
}
|
||||
|
||||
RR.ConnectToLobby();
|
||||
RR.WriteToConsole("Connecting to server...");
|
||||
|
||||
// if (args.Length != 2) {
|
||||
// RR.Console.WriteToOutput($"Usage: {args[0]} <steam_id>");
|
||||
// return;
|
||||
// }
|
||||
|
||||
RR.Connect();
|
||||
}
|
||||
|
||||
[RCCMD("disconnect", "Disconnects from the current server")]
|
||||
public static void DisconnectFromServer(string[] args) {
|
||||
if (args.Length != 1) {
|
||||
RR.Console.WriteToOutput($"Usage: {args[0]}");
|
||||
RR.WriteToConsole($"Usage: {args[0]}");
|
||||
return;
|
||||
}
|
||||
|
||||
RR.Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
public class JelychoGame : IGame {
|
||||
static readonly Logger s_Logger = new Logger(nameof(JelychoGame));
|
||||
|
||||
[Serializable]
|
||||
public class Config {
|
||||
public string mainMenuWorld = "main_menu";
|
||||
public string mainGameplayWorld = "dev";
|
||||
|
||||
public string standardGameMode = "gm_standard";
|
||||
}
|
||||
|
||||
readonly Config m_Config;
|
||||
|
||||
DisposableBag m_DisposableBag;
|
||||
|
||||
public JelychoGame(Config config) {
|
||||
m_Config = config;
|
||||
m_DisposableBag = new DisposableBag();
|
||||
}
|
||||
|
||||
public async UniTask InitAsync(CancellationToken cancellationToken) {
|
||||
Screen.SetResolution(1600, 900, FullScreenMode.Windowed);
|
||||
|
||||
RR.CreateService<CrosshairService>();
|
||||
await UniTask.Yield();
|
||||
}
|
||||
|
||||
public void Run() {
|
||||
RR.GameModes.ActiveGameMode.Subscribe(gameMode => {
|
||||
if (gameMode == null) {
|
||||
RR.Console.WriteToOutput("Game mode stopped, loading main menu world");
|
||||
|
||||
WorldConfigAsset mainMenuWorldConfigAsset = RR.GetWorldConfigAsset(m_Config.mainMenuWorld);
|
||||
RR.World.LoadAsync(mainMenuWorldConfigAsset.Config, CancellationToken.None).Forget();
|
||||
}
|
||||
})
|
||||
.AddTo(ref m_DisposableBag);
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
m_DisposableBag.Dispose();
|
||||
}
|
||||
|
||||
public void NewGame() {
|
||||
NewGameAsync().Forget();
|
||||
}
|
||||
|
||||
async UniTask NewGameAsync() {
|
||||
RR.HostServer();
|
||||
await UniTask.WaitForSeconds(0.5f);
|
||||
|
||||
s_Logger.Info("Starting new game");
|
||||
s_Logger.Info($"Is connected: {RR.IsClient()}");
|
||||
s_Logger.Info($"Is host: {RR.IsHost()}");
|
||||
|
||||
GameModeAsset gameModeAsset = RR.GetGameMode(m_Config.standardGameMode);
|
||||
WorldConfigAsset worldConfigAsset = RR.GetWorldConfigAsset(m_Config.mainGameplayWorld);
|
||||
RR.StartGameMode(gameModeAsset, worldConfigAsset.Config);
|
||||
[RCCMD("version", "Displays the current game version")]
|
||||
public static void GameVersion(string[] args) {
|
||||
RR.WriteToConsole($"Game version: {Application.version}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using RebootKit.Engine.Main;
|
||||
using TriInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RebootReality.jelycho.Main {
|
||||
[CreateAssetMenu(menuName = GameConsts.k_AddComponentMenu + "Jelycho Game")]
|
||||
public class JelychoGameAsset : GameAsset {
|
||||
[SerializeField, InlineProperty, HideLabel] JelychoGame.Config m_Config;
|
||||
|
||||
public override IGame CreateGame() {
|
||||
return new JelychoGame(m_Config);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6db6aab28280422f92077cf32c409b0f
|
||||
timeCreated: 1746666083
|
||||
@@ -22,7 +22,8 @@ namespace RebootReality.jelycho.MainMenu {
|
||||
Button quitButton = root.Q<Button>(k_ButtonQuit);
|
||||
|
||||
playButton.RegisterCallback<ClickEvent>(e => {
|
||||
RR.Game<JelychoGame>().NewGame();
|
||||
RR.StartHost();
|
||||
RR.SetServerWorld("dev");
|
||||
});
|
||||
settingsButton.RegisterCallback<ClickEvent>(e => OpenSettings());
|
||||
quitButton.RegisterCallback<ClickEvent>(e => Application.Quit());
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using RebootKit.Engine.Foundation;
|
||||
using System;
|
||||
using RebootKit.Engine.Foundation;
|
||||
using RebootKit.Engine.Services.Simulation.Sensors;
|
||||
using RebootReality.jelycho.Main;
|
||||
using Unity.Cinemachine;
|
||||
@@ -32,8 +33,8 @@ namespace RebootReality.jelycho.Player {
|
||||
|
||||
readonly RaycastSensor m_RaycastSensor = new RaycastSensor();
|
||||
|
||||
public float Pitch { get; private set; }
|
||||
public float Yaw { get; private set; }
|
||||
[NonSerialized] public float Pitch;
|
||||
[NonSerialized] public float Yaw;
|
||||
|
||||
public ISensor Sensor {
|
||||
get {
|
||||
|
||||
@@ -1,12 +1,32 @@
|
||||
using RebootKit.Engine.Extensions;
|
||||
using RebootKit.Engine.Foundation;
|
||||
using RebootKit.Engine.Main;
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using RebootKit.Engine.Simulation;
|
||||
using Unity.Collections;
|
||||
using Unity.Mathematics;
|
||||
using Unity.Netcode;
|
||||
using UnityEngine;
|
||||
using Logger = RebootKit.Engine.Foundation.Logger;
|
||||
|
||||
namespace RebootReality.jelycho.Player {
|
||||
public class PlayerActor : Actor {
|
||||
public struct PlayerActorState : INetworkSerializable {
|
||||
public Vector3 Position;
|
||||
public Vector3 Velocity;
|
||||
public float LookPitch;
|
||||
public float LookYaw;
|
||||
public bool IsGrounded;
|
||||
|
||||
public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter {
|
||||
serializer.SerializeValue(ref Position);
|
||||
serializer.SerializeValue(ref Velocity);
|
||||
serializer.SerializeValue(ref LookPitch);
|
||||
serializer.SerializeValue(ref LookYaw);
|
||||
serializer.SerializeValue(ref IsGrounded);
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerActor : NetworkBehaviour {
|
||||
static readonly Logger s_Logger = new Logger(nameof(PlayerActor));
|
||||
|
||||
[SerializeField] Animator m_Animator;
|
||||
@@ -48,6 +68,9 @@ namespace RebootReality.jelycho.Player {
|
||||
[SerializeField] PhysicsObjectDragger m_PhysicsDragger;
|
||||
[SerializeField] FloatRange m_DragDistanceRange = new FloatRange(1.0f, 5.0f);
|
||||
|
||||
[Header("Network")]
|
||||
[SerializeField] float m_MinTeleportDistance = 0.5f;
|
||||
|
||||
public float3 LookDirection {
|
||||
get {
|
||||
float pitchRad = math.radians(-m_Camera.Pitch);
|
||||
@@ -58,40 +81,78 @@ namespace RebootReality.jelycho.Player {
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnBeginPlay() {
|
||||
void Start() {
|
||||
m_CameraSpring.Initialize();
|
||||
}
|
||||
|
||||
public override void OnTick(float deltaTime) {
|
||||
// Camera Stuff
|
||||
m_Camera.Tick();
|
||||
public override void OnNetworkSpawn() {
|
||||
base.OnNetworkSpawn();
|
||||
|
||||
if (m_Locomotion.IsGrounded &&
|
||||
m_Locomotion.SpeedXZ >= m_Locomotion.runSpeed * m_EnableCameraBobbingPercentThreshold) {
|
||||
if (m_Locomotion.IsSprinting) {
|
||||
m_TargetCameraBobbing = m_SprintCameraBobbing;
|
||||
} else {
|
||||
m_TargetCameraBobbing = m_RunCameraBobbing;
|
||||
}
|
||||
if (IsOwner) {
|
||||
SetupAsLocalPlayer();
|
||||
|
||||
RR.ClientTick += OnClientTick;
|
||||
} else {
|
||||
m_TargetCameraBobbing = m_IdleCameraBobbing;
|
||||
SetupAsRemotePlayer();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnNetworkDespawn() {
|
||||
base.OnNetworkDespawn();
|
||||
|
||||
if (IsOwner) {
|
||||
RR.ClientTick -= OnClientTick;
|
||||
}
|
||||
}
|
||||
|
||||
void SetupAsLocalPlayer() {
|
||||
m_Camera.enabled = true;
|
||||
m_Camera.Camera.enabled = true;
|
||||
m_Locomotion.enabled = true;
|
||||
|
||||
if (TryGetComponent(out Rigidbody rbody)) {
|
||||
rbody.isKinematic = false;
|
||||
}
|
||||
}
|
||||
|
||||
void SetupAsRemotePlayer() {
|
||||
m_Camera.enabled = false;
|
||||
m_Camera.Camera.enabled = false;
|
||||
m_Locomotion.enabled = false;
|
||||
|
||||
if (TryGetComponent(out Rigidbody rbody)) {
|
||||
rbody.isKinematic = true;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGainedOwnership() {
|
||||
base.OnGainedOwnership();
|
||||
SetupAsLocalPlayer();
|
||||
}
|
||||
|
||||
public override void OnLostOwnership() {
|
||||
base.OnLostOwnership();
|
||||
SetupAsRemotePlayer();
|
||||
}
|
||||
|
||||
void Update() {
|
||||
if (!IsSpawned) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_CurrentCameraBobbing = Mathf.MoveTowards(m_CurrentCameraBobbing,
|
||||
m_TargetCameraBobbing,
|
||||
m_CameraBobbingTransitionSpeed * Time.deltaTime);
|
||||
m_Camera.SetBobbing(m_CurrentCameraBobbing);
|
||||
|
||||
Vector3 actorUp = transform.up;
|
||||
Vector3 actorRight = transform.right;
|
||||
Vector3 actorForward = transform.forward;
|
||||
m_CameraSpring.UpdateSpring(Time.deltaTime, actorUp, actorRight, actorForward);
|
||||
if (IsOwner) {
|
||||
OwnerTick();
|
||||
} else {
|
||||
RemoteTick();
|
||||
}
|
||||
|
||||
// Character rotation
|
||||
float3 targetCharacterForward = math.normalize(LookDirection.With(y: 0.0f));
|
||||
float3 currentCharacterForward = math.normalize(m_CharacterForwardTransform.forward.With(y: 0.0f));
|
||||
|
||||
float angleRad = math.acos(math.clamp(math.dot(targetCharacterForward, currentCharacterForward) / (math.length(targetCharacterForward) * math.length(currentCharacterForward)), -1f, 1f));
|
||||
float angleRad =
|
||||
math.acos(math.clamp(math.dot(targetCharacterForward, currentCharacterForward) / (math.length(targetCharacterForward) * math.length(currentCharacterForward)),
|
||||
-1f, 1f));
|
||||
float angleDeg = math.degrees(angleRad);
|
||||
|
||||
bool rotateCharacter = false;
|
||||
@@ -114,7 +175,7 @@ namespace RebootReality.jelycho.Player {
|
||||
}
|
||||
|
||||
if (rotateCharacter) {
|
||||
m_CharacterTurnVelocity = rotateCharacterSpeed * deltaTime;
|
||||
m_CharacterTurnVelocity = rotateCharacterSpeed * Time.deltaTime;
|
||||
|
||||
Vector3 newForward = Vector3.RotateTowards(currentCharacterForward,
|
||||
targetCharacterForward,
|
||||
@@ -124,13 +185,91 @@ namespace RebootReality.jelycho.Player {
|
||||
}
|
||||
|
||||
// Aim Target adjustment
|
||||
m_HeadAimTargetTransform.position = (float3)m_HeadBoneTransform.position + LookDirection * 5.0f;
|
||||
|
||||
UpdateAnimator();
|
||||
m_HeadAimTargetTransform.position = (float3) m_HeadBoneTransform.position + LookDirection * 5.0f;
|
||||
}
|
||||
|
||||
public void WarpTo(float3 position) {
|
||||
m_Locomotion.WarpTo(position);
|
||||
void OwnerTick() {
|
||||
// Camera Stuff
|
||||
m_Camera.Tick();
|
||||
|
||||
if (m_Locomotion.IsGrounded &&
|
||||
m_Locomotion.SpeedXZ >= m_Locomotion.runSpeed * m_EnableCameraBobbingPercentThreshold) {
|
||||
if (m_Locomotion.IsSprinting) {
|
||||
m_TargetCameraBobbing = m_SprintCameraBobbing;
|
||||
} else {
|
||||
m_TargetCameraBobbing = m_RunCameraBobbing;
|
||||
}
|
||||
} else {
|
||||
m_TargetCameraBobbing = m_IdleCameraBobbing;
|
||||
}
|
||||
|
||||
m_CurrentCameraBobbing = Mathf.MoveTowards(m_CurrentCameraBobbing,
|
||||
m_TargetCameraBobbing,
|
||||
m_CameraBobbingTransitionSpeed * Time.deltaTime);
|
||||
m_Camera.SetBobbing(m_CurrentCameraBobbing);
|
||||
|
||||
m_CameraSpring.UpdateSpring(Time.deltaTime,
|
||||
m_CharacterForwardTransform.up,
|
||||
m_CharacterForwardTransform.right,
|
||||
m_CharacterForwardTransform.forward);
|
||||
|
||||
|
||||
UpdateAnimator(m_Locomotion.Velocity);
|
||||
}
|
||||
|
||||
void RemoteTick() {
|
||||
Vector3 targetPosition = m_NetworkState.Position;
|
||||
|
||||
if ((transform.position - m_NetworkState.Position).sqrMagnitude <
|
||||
m_MinTeleportDistance * m_MinTeleportDistance) {
|
||||
targetPosition = Vector3.MoveTowards(transform.position,
|
||||
m_NetworkState.Position,
|
||||
m_Locomotion.runSpeed * Time.deltaTime);
|
||||
}
|
||||
|
||||
m_Locomotion.WarpTo(targetPosition);
|
||||
|
||||
m_Camera.Pitch = m_NetworkState.LookPitch;
|
||||
m_Camera.Yaw = m_NetworkState.LookYaw;
|
||||
|
||||
UpdateAnimator(m_NetworkState.Velocity);
|
||||
}
|
||||
|
||||
void OnClientTick() {
|
||||
PlayerActorState state = new PlayerActorState {
|
||||
Position = transform.position,
|
||||
LookPitch = m_Camera.Pitch,
|
||||
LookYaw = m_Camera.Yaw,
|
||||
IsGrounded = m_Locomotion.IsGrounded,
|
||||
Velocity = m_Locomotion.Velocity
|
||||
};
|
||||
|
||||
UpdatePlayerStateRpc(state);
|
||||
}
|
||||
|
||||
PlayerActorState m_NetworkState;
|
||||
|
||||
[Rpc(SendTo.NotMe)]
|
||||
void UpdatePlayerStateRpc(PlayerActorState state) {
|
||||
if (IsOwner) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_NetworkState = state;
|
||||
}
|
||||
|
||||
[ServerRpc(RequireOwnership = false)]
|
||||
public void WarpToServerRpc(Vector3 position) {
|
||||
WarpToClientRpc(position);
|
||||
}
|
||||
|
||||
[ClientRpc]
|
||||
void WarpToClientRpc(Vector3 position) {
|
||||
if (IsOwner) {
|
||||
m_Locomotion.WarpTo(position);
|
||||
} else {
|
||||
transform.position = position;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetSprint(bool isSprinting) {
|
||||
@@ -180,8 +319,8 @@ namespace RebootReality.jelycho.Player {
|
||||
public static readonly int Block = Animator.StringToHash("Block");
|
||||
}
|
||||
|
||||
void UpdateAnimator() {
|
||||
Vector3 localVelocity = m_CharacterForwardTransform.InverseTransformDirection(m_Locomotion.Velocity);
|
||||
void UpdateAnimator(Vector3 velocity) {
|
||||
Vector3 localVelocity = m_CharacterForwardTransform.InverseTransformDirection(velocity);
|
||||
float forwardNormalized = localVelocity.z / m_Locomotion.runSpeed;
|
||||
float rightNormalized = localVelocity.x / m_Locomotion.runSpeed;
|
||||
|
||||
|
||||
@@ -1,89 +1,106 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using RebootKit.Engine.Foundation;
|
||||
using RebootKit.Engine.Main;
|
||||
using Unity.Mathematics;
|
||||
using Unity.Netcode;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.InputSystem;
|
||||
using Logger = RebootKit.Engine.Foundation.Logger;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace RebootReality.jelycho.Player {
|
||||
public class PlayerController : IController {
|
||||
readonly Logger m_Logger = new Logger(nameof(PlayerController));
|
||||
readonly Config m_Config;
|
||||
public class PlayerController : NetworkPlayerController {
|
||||
static readonly Logger s_Logger = new Logger(nameof(PlayerController));
|
||||
|
||||
PlayerActor m_FPPActor;
|
||||
[SerializeField] Config m_Config;
|
||||
|
||||
public PlayerController(Config config) {
|
||||
m_Config = config;
|
||||
PlayerActor m_Actor;
|
||||
|
||||
public override void OnNetworkSpawn() {
|
||||
base.OnNetworkSpawn();
|
||||
|
||||
if (IsOwner) {
|
||||
RR.Input.LockCursor();
|
||||
RR.Input.EnableControls();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
public override void OnNetworkDespawn() {
|
||||
base.OnNetworkDespawn();
|
||||
|
||||
if (IsOwner) {
|
||||
RR.Input.UnlockCursor();
|
||||
RR.Input.DisableControls();
|
||||
}
|
||||
}
|
||||
|
||||
public async UniTask OnStart(CancellationToken cancellationToken) {
|
||||
RR.Input.LockCursor();
|
||||
RR.Input.EnableControls();
|
||||
|
||||
m_FPPActor = await RR.World.SpawnActor<PlayerActor>(m_Config.playerActorPrefab, cancellationToken);
|
||||
m_FPPActor.IsPlaying = true;
|
||||
|
||||
if (RR.World.Context is WorldContext worldContext) {
|
||||
m_FPPActor.WarpTo(worldContext.PlayerSpawnPoint.position);
|
||||
[ClientRpc]
|
||||
public void SetActorClientRpc(ulong networkObjectID) {
|
||||
if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(networkObjectID,
|
||||
out NetworkObject networkObject)) {
|
||||
m_Actor = networkObject.GetComponent<PlayerActor>();
|
||||
s_Logger.Info($"Found Player Actor NetworkObject ID: {networkObjectID}");
|
||||
} else {
|
||||
s_Logger.Error($"Failed to find PlayerActor with NetworkObject ID: {networkObjectID}");
|
||||
m_Actor = null;
|
||||
}
|
||||
|
||||
await UniTask.Yield(cancellationToken);
|
||||
if (m_Actor is null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsServer) {
|
||||
if (RR.World.Context is WorldContext worldContext) {
|
||||
m_Actor.WarpToServerRpc(worldContext.PlayerSpawnPoint.position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnStop() {
|
||||
RR.Input.DisableControls();
|
||||
RR.Input.UnlockCursor();
|
||||
|
||||
RR.World.KillActor(m_FPPActor);
|
||||
[ClientRpc]
|
||||
public void SetNullActorClientRpc() {
|
||||
m_Actor = null;
|
||||
}
|
||||
|
||||
public void OnTick() {
|
||||
if (m_FPPActor is null) {
|
||||
m_Logger.Error("Player actor is not initialized. Make sure to call OnStart() before OnTick().");
|
||||
void Update() {
|
||||
if (m_Actor is null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsOwner) {
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 lookInput = SensitivityReader.Read(m_Config.lookActionReference.action);
|
||||
m_FPPActor.Look(lookInput * FPPConfig.MouseSensitivity.FloatValue);
|
||||
m_Actor.Look(lookInput * FPPConfig.MouseSensitivity.FloatValue);
|
||||
|
||||
Vector2 moveInput = m_Config.moveActionReference.action.ReadValue<Vector2>();
|
||||
m_FPPActor.SetMoveInput(moveInput);
|
||||
m_Actor.SetMoveInput(moveInput);
|
||||
|
||||
m_FPPActor.SetSprint(m_Config.sprintActionReference.action.IsPressed());
|
||||
m_Actor.SetSprint(m_Config.sprintActionReference.action.IsPressed());
|
||||
|
||||
if (m_Config.jumpActionReference.action.WasPerformedThisFrame()) {
|
||||
m_FPPActor.Jump();
|
||||
m_Actor.Jump();
|
||||
}
|
||||
|
||||
if (m_Config.dragObjectActionReference.action.WasPressedThisFrame()) {
|
||||
m_FPPActor.StartDrag();
|
||||
m_Actor.StartDrag();
|
||||
}
|
||||
|
||||
if (m_Config.dragObjectActionReference.action.WasReleasedThisFrame()) {
|
||||
m_FPPActor.StopDrag();
|
||||
m_Actor.StopDrag();
|
||||
}
|
||||
|
||||
if (m_Config.primaryActionReference.action.WasReleasedThisFrame()) {
|
||||
m_FPPActor.PrimaryAction();
|
||||
m_Actor.PrimaryAction();
|
||||
}
|
||||
|
||||
if (m_Config.secondaryActionReference.action.WasReleasedThisFrame()) {
|
||||
m_FPPActor.SecondaryAction();
|
||||
m_Actor.SecondaryAction();
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Config {
|
||||
public AssetReferenceT<GameObject> playerActorPrefab;
|
||||
|
||||
public InputActionReference moveActionReference;
|
||||
public InputActionReference lookActionReference;
|
||||
public InputActionReference jumpActionReference;
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using RebootKit.Engine.Foundation;
|
||||
using RebootReality.jelycho.Main;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RebootReality.jelycho.Player {
|
||||
[CreateAssetMenu(menuName = GameConsts.k_CreateAssetMenu + "Player/Player Controller")]
|
||||
public class PlayerControllerAsset : ControllerAsset {
|
||||
[SerializeField] PlayerController.Config m_Config;
|
||||
|
||||
public override IController Create() {
|
||||
PlayerController controller = new PlayerController(m_Config);
|
||||
return controller;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a96eb98c0051478f95c5ee18399ec93f
|
||||
timeCreated: 1744662807
|
||||
@@ -1,4 +1,5 @@
|
||||
using RebootKit.Engine.Services.Simulation;
|
||||
using RebootKit.Engine.Simulation;
|
||||
using RebootReality.jelycho.Ropes;
|
||||
using UnityEngine;
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1a6162ffd783458ba697dcc1e1c40bea, type: 3}
|
||||
m_Name: gm_standard
|
||||
m_EditorClassIdentifier:
|
||||
m_Config:
|
||||
playerControllerAsset: {fileID: 11400000, guid: 13f10cbebc4d5454eafaa689dddcc2d0, type: 2}
|
||||
playerPrefab:
|
||||
m_AssetGUID: be292ae0883a3be4090cdc42a4c7c131
|
||||
m_SubObjectName:
|
||||
m_SubObjectGUID:
|
||||
m_SubObjectType:
|
||||
m_EditorAssetChanged: 0
|
||||
worldConfig: {fileID: 11400000, guid: b7b55be30d0c5b64892f70dfa3389ee2, type: 2}
|
||||
@@ -1,18 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6db6aab28280422f92077cf32c409b0f, type: 3}
|
||||
m_Name: Jelycho
|
||||
m_EditorClassIdentifier:
|
||||
m_Config:
|
||||
mainMenuWorld: main_menu
|
||||
mainGameplayWorld: dev
|
||||
standardGameMode: gm_standard
|
||||
@@ -1,22 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dff210be181a0cd408f6b35eff2f38af, type: 3}
|
||||
m_Name: world_main_menu
|
||||
m_EditorClassIdentifier:
|
||||
<Config>k__BackingField:
|
||||
name: main_menu
|
||||
mainScene:
|
||||
m_AssetGUID: abb7fe7f372ba7640b0ab138239c7f78
|
||||
m_SubObjectName:
|
||||
m_SubObjectGUID:
|
||||
m_SubObjectType:
|
||||
m_EditorAssetChanged: 0
|
||||
76
Assets/jelycho/Prefabs/jelycho_game.prefab
Normal file
76
Assets/jelycho/Prefabs/jelycho_game.prefab
Normal file
@@ -0,0 +1,76 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4105802788753539860
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4659869139766639144}
|
||||
- component: {fileID: 5359501897604502255}
|
||||
- component: {fileID: 7133476019135208936}
|
||||
m_Layer: 0
|
||||
m_Name: jelycho_game
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &4659869139766639144
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4105802788753539860}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5359501897604502255
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4105802788753539860}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
GlobalObjectIdHash: 2671151935
|
||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
AlwaysReplicateAsRoot: 0
|
||||
SynchronizeTransform: 0
|
||||
ActiveSceneSynchronization: 0
|
||||
SceneMigrationSynchronization: 0
|
||||
SpawnWithObservers: 1
|
||||
DontDestroyWithOwner: 0
|
||||
AutoObjectParentSync: 0
|
||||
SyncOwnerTransformWhenParented: 0
|
||||
AllowOwnerToParent: 0
|
||||
--- !u!114 &7133476019135208936
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4105802788753539860}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1b48aaf4fa4f43cc866687a188087c90, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
m_PlayerControllerPrefab: {fileID: 4106369065237924727, guid: d15ca0257a10a034e826a60fba11989b, type: 3}
|
||||
m_PlayerActorPrefab: {fileID: -6995192488338000116, guid: be292ae0883a3be4090cdc42a4c7c131, type: 3}
|
||||
m_MainWorldID: dev
|
||||
5
Assets/jelycho/GameModes/standard.meta → Assets/jelycho/Prefabs/jelycho_game.prefab.meta
Executable file → Normal file
5
Assets/jelycho/GameModes/standard.meta → Assets/jelycho/Prefabs/jelycho_game.prefab.meta
Executable file → Normal file
@@ -1,7 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c645c8bf30572e43a34e8ac45ac2b5b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
guid: 04a34e58b066c014eaaeb846b2bd3213
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
87
Assets/jelycho/Prefabs/player_controller.prefab
Normal file
87
Assets/jelycho/Prefabs/player_controller.prefab
Normal file
@@ -0,0 +1,87 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &6202808672838313896
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6561785133852080874}
|
||||
- component: {fileID: 5420487007540367070}
|
||||
- component: {fileID: 4106369065237924727}
|
||||
m_Layer: 0
|
||||
m_Name: player_controller
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6561785133852080874
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6202808672838313896}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &5420487007540367070
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6202808672838313896}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
GlobalObjectIdHash: 1174112582
|
||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
AlwaysReplicateAsRoot: 0
|
||||
SynchronizeTransform: 0
|
||||
ActiveSceneSynchronization: 0
|
||||
SceneMigrationSynchronization: 0
|
||||
SpawnWithObservers: 1
|
||||
DontDestroyWithOwner: 0
|
||||
AutoObjectParentSync: 0
|
||||
SyncOwnerTransformWhenParented: 0
|
||||
AllowOwnerToParent: 0
|
||||
--- !u!114 &4106369065237924727
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6202808672838313896}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b37cddcc047346c18521710d64a2ec39, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
m_Config:
|
||||
playerActorPrefab:
|
||||
m_AssetGUID:
|
||||
m_SubObjectName:
|
||||
m_SubObjectGUID:
|
||||
m_SubObjectType:
|
||||
m_EditorAssetChanged: 0
|
||||
moveActionReference: {fileID: -2772844096359753972, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3}
|
||||
lookActionReference: {fileID: -5746443703610909298, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3}
|
||||
jumpActionReference: {fileID: 2789365106649255415, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3}
|
||||
sprintActionReference: {fileID: 7801716088028601855, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3}
|
||||
dragObjectActionReference: {fileID: 2331847964233633448, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3}
|
||||
primaryActionReference: {fileID: 7005240712943983493, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3}
|
||||
secondaryActionReference: {fileID: -1076036341132388265, guid: f991e9abd9a53ee4b94b329a5ce96cb2, type: 3}
|
||||
5
Assets/jelycho/Jelycho.asset.meta → Assets/jelycho/Prefabs/player_controller.prefab.meta
Executable file → Normal file
5
Assets/jelycho/Jelycho.asset.meta → Assets/jelycho/Prefabs/player_controller.prefab.meta
Executable file → Normal file
@@ -1,8 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 86b2e13dcab64314e8c5b56c17a956d3
|
||||
NativeFormatImporter:
|
||||
guid: d15ca0257a10a034e826a60fba11989b
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -12,7 +12,9 @@
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:e0cd26848372d4e5c891c569017e11f1",
|
||||
"GUID:324caed91501a9c47a04ebfd87b68794",
|
||||
"GUID:2665a8d13d1b3f18800f46e256720795"
|
||||
"GUID:2665a8d13d1b3f18800f46e256720795",
|
||||
"GUID:1491147abca9d7d4bb7105af628b223e",
|
||||
"GUID:84651a3751eca9349aac36a66bba901b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
@@ -829,6 +829,9 @@ GameObject:
|
||||
- component: {fileID: 559053461}
|
||||
- component: {fileID: 559053460}
|
||||
- component: {fileID: 559053464}
|
||||
- component: {fileID: 559053465}
|
||||
- component: {fileID: 559053467}
|
||||
- component: {fileID: 559053466}
|
||||
m_Layer: 0
|
||||
m_Name: Strange Cube
|
||||
m_TagString: Untagged
|
||||
@@ -952,6 +955,94 @@ Rigidbody:
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!114 &559053465
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 559053459}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
GlobalObjectIdHash: 3592195196
|
||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
AlwaysReplicateAsRoot: 0
|
||||
SynchronizeTransform: 1
|
||||
ActiveSceneSynchronization: 0
|
||||
SceneMigrationSynchronization: 1
|
||||
SpawnWithObservers: 1
|
||||
DontDestroyWithOwner: 0
|
||||
AutoObjectParentSync: 1
|
||||
SyncOwnerTransformWhenParented: 1
|
||||
AllowOwnerToParent: 0
|
||||
--- !u!114 &559053466
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 559053459}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f6c0be61502bb534f922ebb746851216, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
NetworkRigidbodyBaseExpanded: 0
|
||||
UseRigidBodyForMotion: 0
|
||||
AutoUpdateKinematicState: 1
|
||||
AutoSetKinematicOnDespawn: 1
|
||||
--- !u!114 &559053467
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 559053459}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
NetworkTransformExpanded: 0
|
||||
AutoOwnerAuthorityTickOffset: 1
|
||||
PositionInterpolationType: 0
|
||||
RotationInterpolationType: 0
|
||||
ScaleInterpolationType: 0
|
||||
PositionLerpSmoothing: 1
|
||||
PositionMaxInterpolationTime: 0.1
|
||||
RotationLerpSmoothing: 1
|
||||
RotationMaxInterpolationTime: 0.1
|
||||
ScaleLerpSmoothing: 1
|
||||
ScaleMaxInterpolationTime: 0.1
|
||||
AuthorityMode: 0
|
||||
TickSyncChildren: 0
|
||||
UseUnreliableDeltas: 0
|
||||
SyncPositionX: 1
|
||||
SyncPositionY: 1
|
||||
SyncPositionZ: 1
|
||||
SyncRotAngleX: 1
|
||||
SyncRotAngleY: 1
|
||||
SyncRotAngleZ: 1
|
||||
SyncScaleX: 1
|
||||
SyncScaleY: 1
|
||||
SyncScaleZ: 1
|
||||
PositionThreshold: 0.001
|
||||
RotAngleThreshold: 0.01
|
||||
ScaleThreshold: 0.01
|
||||
UseQuaternionSynchronization: 0
|
||||
UseQuaternionCompression: 0
|
||||
UseHalfFloatPrecision: 0
|
||||
InLocalSpace: 0
|
||||
SwitchTransformSpaceWhenParented: 0
|
||||
Interpolate: 1
|
||||
SlerpPosition: 0
|
||||
--- !u!1 &560428099
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -653,6 +653,7 @@ GameObject:
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7761779135599839476}
|
||||
- component: {fileID: 1777844635373707840}
|
||||
- component: {fileID: -6995192488338000116}
|
||||
- component: {fileID: 7282522638044830840}
|
||||
- component: {fileID: 2402344678768307677}
|
||||
@@ -685,6 +686,31 @@ Transform:
|
||||
- {fileID: 6286051764664211472}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1777844635373707840
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6086846679135428685}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
GlobalObjectIdHash: 2049124118
|
||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||
DeferredDespawnTick: 0
|
||||
Ownership: 1
|
||||
AlwaysReplicateAsRoot: 0
|
||||
SynchronizeTransform: 0
|
||||
ActiveSceneSynchronization: 0
|
||||
SceneMigrationSynchronization: 0
|
||||
SpawnWithObservers: 1
|
||||
DontDestroyWithOwner: 0
|
||||
AutoObjectParentSync: 0
|
||||
SyncOwnerTransformWhenParented: 0
|
||||
AllowOwnerToParent: 0
|
||||
--- !u!114 &-6995192488338000116
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -697,11 +723,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 6f6d4b18db6741e9a8b71255b18714ac, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<ActorGuid>k__BackingField:
|
||||
A: 2622242542
|
||||
B: 1139302270
|
||||
C: 1967136438
|
||||
D: 3433895425
|
||||
ShowTopMostFoldoutHeaderGroup: 1
|
||||
m_Animator: {fileID: 134164689146528362}
|
||||
m_Locomotion: {fileID: 3055557605397218987}
|
||||
m_Camera: {fileID: 7282522638044830840}
|
||||
@@ -1311,12 +1333,7 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5866666021909216657, guid: e74130c49b009364f90d176af44766be, type: 3}
|
||||
propertyPath: m_WarningMessage
|
||||
value: "\nBinding warning: Some generic clip(s) animate transforms that are
|
||||
already bound by a Humanoid avatar. These transforms can only be changed
|
||||
by Humanoid clips.\n\tTransform 'mixamorig:Spine1'\n\tTransform 'mixamorig:Head'\n\tTransform
|
||||
'mixamorig:Hips'\n\tTransform 'mixamorig:Spine2'\n\tTransform 'mixamorig:Neck'\n\tTransform
|
||||
'mixamorig:Spine'\n\tTransform 'mixamorig:Spine1'\n\tTransform 'mixamorig:Head'\n\tTransform
|
||||
'mixamorig:Hips'\n\tTransform 'mixamorig:Spine2'\n\tand more ..."
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5866666021909216657, guid: e74130c49b009364f90d176af44766be, type: 3}
|
||||
propertyPath: m_ApplyRootMotion
|
||||
|
||||
@@ -15,11 +15,14 @@
|
||||
"com.unity.ide.visualstudio": "2.0.22",
|
||||
"com.unity.inputsystem": "1.13.0",
|
||||
"com.unity.multiplayer.center": "1.0.0",
|
||||
"com.unity.multiplayer.playmode": "1.3.3",
|
||||
"com.unity.netcode.gameobjects": "2.4.3",
|
||||
"com.unity.probuilder": "6.0.5",
|
||||
"com.unity.recorder": "5.1.2",
|
||||
"com.unity.render-pipelines.universal": "17.0.4",
|
||||
"com.unity.test-framework": "1.4.6",
|
||||
"com.unity.timeline": "1.8.7",
|
||||
"com.unity.transport": "2.5.1",
|
||||
"com.unity.ugui": "2.0.0",
|
||||
"com.unity.visualscripting": "1.9.5",
|
||||
"com.unity.modules.accessibility": "1.0.0",
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
},
|
||||
"com.unity.mathematics": {
|
||||
"version": "1.3.2",
|
||||
"depth": 2,
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
@@ -186,16 +186,35 @@
|
||||
"com.unity.modules.uielements": "1.0.0"
|
||||
}
|
||||
},
|
||||
"com.unity.multiplayer.playmode": {
|
||||
"version": "1.3.3",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.nuget.newtonsoft-json": "2.0.2"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.netcode.gameobjects": {
|
||||
"version": "2.4.3",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.transport": "2.4.0",
|
||||
"com.unity.nuget.mono-cecil": "1.11.4"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.nuget.mono-cecil": {
|
||||
"version": "1.11.4",
|
||||
"depth": 2,
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.nuget.newtonsoft-json": {
|
||||
"version": "3.2.1",
|
||||
"depth": 2,
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
@@ -346,6 +365,17 @@
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.transport": {
|
||||
"version": "2.5.1",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.burst": "1.8.12",
|
||||
"com.unity.collections": "2.2.1",
|
||||
"com.unity.mathematics": "1.3.1"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ugui": {
|
||||
"version": "2.0.0",
|
||||
"depth": 0,
|
||||
|
||||
@@ -142,7 +142,7 @@ PlayerSettings:
|
||||
loadStoreDebugModeEnabled: 0
|
||||
visionOSBundleVersion: 1.0
|
||||
tvOSBundleVersion: 1.0
|
||||
bundleVersion: 0.1.23
|
||||
bundleVersion: 0.1.39
|
||||
preloadedAssets:
|
||||
- {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
- {fileID: 11400000, guid: 5e0d3796a45800e429656e78e50c710e, type: 2}
|
||||
@@ -828,7 +828,7 @@ PlayerSettings:
|
||||
webGLCloseOnQuit: 0
|
||||
webWasm2023: 0
|
||||
scriptingDefineSymbols:
|
||||
Standalone: RR_DEBUG;STEAMWORKS_NET
|
||||
Standalone: RR_DEBUG
|
||||
additionalCompilerArguments: {}
|
||||
platformArchitecture: {}
|
||||
scriptingBackend:
|
||||
|
||||
4
ProjectSettings/VirtualProjectsConfig.json
Normal file
4
ProjectSettings/VirtualProjectsConfig.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"PlayerTags": [],
|
||||
"version": "1.3.3"
|
||||
}
|
||||
Reference in New Issue
Block a user