added: new maru model and downed animation

This commit is contained in:
Chris
2025-10-20 13:47:16 -04:00
parent aa3c51f06e
commit 6d57b7bb56
8 changed files with 512 additions and 14 deletions

View File

@@ -0,0 +1,139 @@
fileFormatVersion: 2
guid: 4dc587b0f2924c34990ef2f162499eba
ModelImporter:
serializedVersion: 24200
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:
- serializedVersion: 16
name: Downed
takeName: Downed
internalID: -5093893791167760947
firstFrame: -1
lastFrame: 120
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 1
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
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
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -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:

View File

@@ -611,7 +611,13 @@ AnimatorController:
m_Name: MaruTestController
serializedVersion: 5
m_AnimatorParameters:
- m_Name: MoveX
- m_Name: Move Direction X
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: Move Direction Y
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
@@ -623,12 +629,6 @@ AnimatorController:
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: MoveY
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: GoHardMelee
m_Type: 9
m_DefaultFloat: 0
@@ -752,12 +752,16 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: -4291637482382203046}
m_Position: {x: 910, y: 230, z: 0}
- serializedVersion: 1
m_State: {fileID: 6032011949097874162}
m_Position: {x: 520, y: 570, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_AnyStateTransitions:
- {fileID: 3576987541970407646}
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 10, y: 20, z: 0}
m_AnyStatePosition: {x: 230, y: 570, z: 0}
m_EntryPosition: {x: 10, y: 150, z: 0}
m_ExitPosition: {x: 1310, y: 280, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
@@ -814,6 +818,28 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &3576987541970407646
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6032011949097874162}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &4546395547719917436
AnimatorStateTransition:
m_ObjectHideFlags: 1
@@ -934,13 +960,39 @@ BlendTree:
m_CycleOffset: 0
m_DirectBlendParameter: Blend
m_Mirror: 0
m_BlendParameter: MoveX
m_BlendParameterY: MoveY
m_BlendParameter: Move Direction X
m_BlendParameterY: Move Direction Y
m_MinThreshold: 0
m_MaxThreshold: 3
m_UseAutomaticThresholds: 0
m_NormalizedBlendValues: 0
m_BlendType: 1
--- !u!1102 &6032011949097874162
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New State
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -5093893791167760947, guid: 4dc587b0f2924c34990ef2f162499eba, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &8988256169245471875
AnimatorStateTransition:
m_ObjectHideFlags: 1

Binary file not shown.

View File

@@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: f48a3ffa82d4f324d82694fcbc66bb9a
ModelImporter:
serializedVersion: 24200
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
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -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:

View File

@@ -137,6 +137,7 @@ GameObject:
- component: {fileID: 5070944620793365545}
- component: {fileID: 4227131494895359615}
- component: {fileID: 4020293503545581060}
- component: {fileID: 2832127593411522816}
m_Layer: 7
m_Name: Player
m_TagString: Untagged
@@ -159,6 +160,7 @@ Transform:
m_Children:
- {fileID: 2655796284435897345}
- {fileID: 4019564870895517434}
- {fileID: 4382182686028875865}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2538182172493791937
@@ -200,6 +202,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
controls: {fileID: 0}
_isDowned:
m_InternalValue: 1
pickupTarget: {fileID: 0}
--- !u!114 &8163344541298437235
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -212,6 +217,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b3b4e13d59527d1429a62dde97c6a001, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
data:
directionChangingSoftness:
targetValue: 20
@@ -548,6 +554,33 @@ MonoBehaviour:
hitRotationOffset: {x: 0, y: 0, z: 0}
gizmoDrawingCondition: 0
children: []
- label: player
castType: 4
active: 1
length: 2
direction: {x: 0, y: 0, z: 1}
offset: {x: 0, y: 0.75, z: -0.5}
ignoreLayers:
serializedVersion: 2
m_Bits: 128
ignoreObjects: []
dontIgnoreSelf: 0
width: 1
size: {x: 0, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0}
overlapHits: []
drawLabel: 0
labelTextLocation: 0
labelSize: 0
labelLocationOffset: {x: 0, y: 0, z: 0}
labelRotationOffset: {x: 0, y: 0, z: 0}
drawHitName: 0
hitTextLocation: 0
hitTextSize: 0
hitLocationOffset: {x: 0, y: 0, z: 0}
hitRotationOffset: {x: 0, y: 0, z: 0}
gizmoDrawingCondition: 0
children: []
references:
version: 2
RefIds: []
@@ -761,10 +794,11 @@ MonoBehaviour:
UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"Combat
Information":{"_value":{},"_name":"Combat Information","_id":"a15396c3-5ba0-4789-b5c5-39a6cfea1943","$type":"NodeCanvas.Framework.Variable`1[[NodeCanvas.Framework.VariableSeperator,
ParadoxNotion, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"inGoHard":{"_propertyPath":"PlayerMeter.inGoHard","_name":"inGoHard","_id":"dc9f60c8-856e-4970-bf11-25745eff1201","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}}}'
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"pickupTarget":{"_propertyPath":"Reset.Units.Player.pickupTarget","_name":"pickupTarget","_id":"bf809a37-76c1-4dd7-8528-cc09527cb016","$type":"NodeCanvas.Framework.Variable`1[[Reset.Units.Player,
Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}}}'
_objectReferences:
- {fileID: 0}
- {fileID: 6535719103590072454}
- {fileID: 8505492416078151957}
_serializedVariables:
- _json: '{"_value":{},"_name":"Resolved Movement","_id":"58618e1a-1bf3-4346-a961-2787a78116fa","$type":"NodeCanvas.Framework.Variable`1[[NodeCanvas.Framework.VariableSeperator,
ParadoxNotion, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
@@ -794,13 +828,16 @@ MonoBehaviour:
UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references:
- {fileID: 0}
- {fileID: 6535719103590072454}
- {fileID: 8505492416078151957}
- _json: '{"_value":{},"_name":"Combat Information","_id":"a15396c3-5ba0-4789-b5c5-39a6cfea1943","$type":"NodeCanvas.Framework.Variable`1[[NodeCanvas.Framework.VariableSeperator,
ParadoxNotion, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
- _json: '{"_propertyPath":"PlayerMeter.inGoHard","_name":"inGoHard","_id":"dc9f60c8-856e-4970-bf11-25745eff1201","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}'
_references: []
- _json: '{"_propertyPath":"Reset.Units.Player.pickupTarget","_name":"pickupTarget","_id":"bf809a37-76c1-4dd7-8528-cc09527cb016","$type":"NodeCanvas.Framework.Variable`1[[Reset.Units.Player,
Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}'
_references: []
--- !u!95 &8583102325603564116
Animator:
serializedVersion: 7
@@ -942,6 +979,20 @@ MonoBehaviour:
TriggerNameHash: -309998415
TransitionIndex: 0
m_Animator: {fileID: 6535719103590072454}
--- !u!114 &2832127593411522816
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2757828562731694833}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a481e07cce98ed54ea4f1e9622c7df8b, type: 3}
m_Name:
m_EditorClassIdentifier: Core::Reset.Units.UnitAnimation
ShowTopMostFoldoutHeaderGroup: 1
modelAnimator: {fileID: 8505492416078151957}
--- !u!1 &9138484595871696647
GameObject:
m_ObjectHideFlags: 0
@@ -1084,6 +1135,10 @@ PrefabInstance:
propertyPath: m_Name
value: MaruTestMesh
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: e3ac69b01ac41514ab5cde0dffb31c13, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
@@ -1184,3 +1239,99 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!1001 &4276760010964545458
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 7329826263822975762}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_Name
value: PlayerModel
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
insertIndex: -1
addedObject: {fileID: 8505492416078151957}
m_SourcePrefab: {fileID: 100100000, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
--- !u!1 &4006923029357400803 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
m_PrefabInstance: {fileID: 4276760010964545458}
m_PrefabAsset: {fileID: 0}
--- !u!95 &8505492416078151957
Animator:
serializedVersion: 7
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4006923029357400803}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 8def683e913d7b54087d096cf3fc05b8, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_AnimatePhysics: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
--- !u!4 &4382182686028875865 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: f48a3ffa82d4f324d82694fcbc66bb9a, type: 3}
m_PrefabInstance: {fileID: 4276760010964545458}
m_PrefabAsset: {fileID: 0}

View File

@@ -0,0 +1,44 @@
using System;
using UnityEngine;
namespace Reset.Units{
public class UnitAnimation : UnitComponent{
public Animator modelAnimator;
// Temporary
private float inputMagnitude;
void Start(){
}
void Update(){
try {
// Temporary
inputMagnitude = Mathf.MoveTowards(inputMagnitude, GetComponent<PlayerControls>().rawMoveInput.magnitude * 2f, 6f * Time.deltaTime);
modelAnimator.SetFloat("Move Direction X", Unit.Movement.GetResolvedDirectionLocal().x * inputMagnitude);
modelAnimator.SetFloat("Move Direction Y", Unit.Movement.GetResolvedDirectionLocal().y * inputMagnitude);
} catch (Exception e) {
Debug.LogError($"Failed in setting X and Y move direction floats: {e.Message}");
}
}
public void SendTriggerToAnimator(string trigger){
if (!modelAnimator) {
Debug.LogError($"There is no animator set to recieve the trigger '{trigger}' on unit {name}.", gameObject);
return;
}
try {
modelAnimator.SetTrigger(trigger);
}
catch (Exception e)
{
Debug.LogError($"Failed to send trigger to Animator: {e.Message}");
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a481e07cce98ed54ea4f1e9622c7df8b