Moved from swarm to NavMesh - need to fix the enemy navigation! Review the animation controller to see if anything is being triggered.

This commit is contained in:
2026-06-19 16:20:36 +01:00
parent 14371de4e6
commit e058a7984f
705 changed files with 2046326 additions and 219 deletions

View File

@@ -1,5 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3552221629283232474
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
@@ -8,7 +21,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M_Dummy
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
@@ -17,12 +30,18 @@ Material:
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: 52475fb4afae07b4384becbad96a4bee, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
@@ -44,7 +63,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 52475fb4afae07b4384becbad96a4bee, type: 3}
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
@@ -59,12 +78,39 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
@@ -72,12 +118,22 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -8,7 +8,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M_Ground
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
@@ -17,12 +17,18 @@ Material:
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
@@ -59,12 +65,39 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0.2
- _GlossyReflections: 1
@@ -72,12 +105,35 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.2
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.5553578, g: 0.5795657, b: 0.6037736, a: 1}
- _BaseColor: {r: 0.55535775, g: 0.5795657, b: 0.6037736, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &4319642136347252985
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10

View File

@@ -1,24 +1,47 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2456336894964905954
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: M_Sky
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
@@ -55,11 +78,39 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 1
- _Glossiness: 0
- _GlossyReflections: 1
@@ -67,12 +118,22 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _UVSec: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.53333336, g: 0.5764706, b: 0.6, a: 1}
- _BaseColor: {r: 0.5333333, g: 0.57647055, b: 0.6, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@@ -172,6 +172,15 @@ public partial class @Controls: IInputActionCollection2, IDisposable
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Repair"",
""type"": ""Button"",
""id"": ""ebf1fc31-ad4a-479b-89a7-8002e36f95bf"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@@ -471,6 +480,28 @@ public partial class @Controls: IInputActionCollection2, IDisposable
""action"": ""Attack"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""627e81c9-a30c-497f-bbed-cfdc79f3a0f8"",
""path"": ""<Keyboard>/r"",
""interactions"": """",
""processors"": """",
""groups"": "";Keyboard and Mouse"",
""action"": ""Repair"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""d59edd54-8ff7-49e2-b568-6b6983bc7e6a"",
""path"": ""<Gamepad>/buttonEast"",
""interactions"": """",
""processors"": """",
""groups"": "";Gamepad"",
""action"": ""Repair"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
@@ -516,6 +547,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
m_Player_Crouch = m_Player.FindAction("Crouch", throwIfNotFound: true);
m_Player_LockOn = m_Player.FindAction("LockOn", throwIfNotFound: true);
m_Player_Attack = m_Player.FindAction("Attack", throwIfNotFound: true);
m_Player_Repair = m_Player.FindAction("Repair", throwIfNotFound: true);
}
~@Controls()
@@ -605,6 +637,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
private readonly InputAction m_Player_Crouch;
private readonly InputAction m_Player_LockOn;
private readonly InputAction m_Player_Attack;
private readonly InputAction m_Player_Repair;
/// <summary>
/// Provides access to input actions defined in input action map "Player".
/// </summary>
@@ -653,6 +686,10 @@ public partial class @Controls: IInputActionCollection2, IDisposable
/// </summary>
public InputAction @Attack => m_Wrapper.m_Player_Attack;
/// <summary>
/// Provides access to the underlying input action "Player/Repair".
/// </summary>
public InputAction @Repair => m_Wrapper.m_Player_Repair;
/// <summary>
/// Provides access to the underlying input action map instance.
/// </summary>
public InputActionMap Get() { return m_Wrapper.m_Player; }
@@ -705,6 +742,9 @@ public partial class @Controls: IInputActionCollection2, IDisposable
@Attack.started += instance.OnAttack;
@Attack.performed += instance.OnAttack;
@Attack.canceled += instance.OnAttack;
@Repair.started += instance.OnRepair;
@Repair.performed += instance.OnRepair;
@Repair.canceled += instance.OnRepair;
}
/// <summary>
@@ -743,6 +783,9 @@ public partial class @Controls: IInputActionCollection2, IDisposable
@Attack.started -= instance.OnAttack;
@Attack.performed -= instance.OnAttack;
@Attack.canceled -= instance.OnAttack;
@Repair.started -= instance.OnRepair;
@Repair.performed -= instance.OnRepair;
@Repair.canceled -= instance.OnRepair;
}
/// <summary>
@@ -872,5 +915,12 @@ public partial class @Controls: IInputActionCollection2, IDisposable
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnAttack(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Repair" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
/// </summary>
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnRepair(InputAction.CallbackContext context);
}
}

View File

@@ -86,6 +86,15 @@
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Repair",
"type": "Button",
"id": "ebf1fc31-ad4a-479b-89a7-8002e36f95bf",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
@@ -385,6 +394,28 @@
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "627e81c9-a30c-497f-bbed-cfdc79f3a0f8",
"path": "<Keyboard>/r",
"interactions": "",
"processors": "",
"groups": ";Keyboard and Mouse",
"action": "Repair",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "d59edd54-8ff7-49e2-b568-6b6983bc7e6a",
"path": "<Gamepad>/buttonEast",
"interactions": "",
"processors": "",
"groups": ";Gamepad",
"action": "Repair",
"isComposite": false,
"isPartOfComposite": false
}
]
}

View File

@@ -38,6 +38,8 @@ namespace Synty.AnimationBaseLocomotion.Samples.InputSystem
public Action onSprintDeactivated;
public Action onWalkToggled;
public Action onRepairActivated;
public Action onRepairDeactivated;
/// <inheritdoc cref="OnEnable" />
private void OnEnable()
@@ -182,5 +184,18 @@ namespace Synty.AnimationBaseLocomotion.Samples.InputSystem
onAttackPerformed?.Invoke();
}
public void OnRepair(InputAction.CallbackContext context)
{
if (context.started)
{
// Broadcast to any script listening that the repair button was pressed
onRepairActivated?.Invoke();
}
else if (context.canceled)
{
// Broadcast that the button was released
onRepairDeactivated?.Invoke();
}
}
}
}