From 0a4c95665780c90a214c0128bb634d3c78c8eeb0 Mon Sep 17 00:00:00 2001 From: Chris Collins <29593332+christides11@users.noreply.github.com> Date: Sat, 30 Sep 2023 18:28:30 -0700 Subject: [PATCH] refactor: Context for state functions & conditions BREAKING CHANGE: Now pass context objects into state functions/conditions. Makes it easier to change what we pass into them later on. --- .../HnSF/Combat/Boxes/Hurtbox/HurtboxGroup.cs | 4 +- Assets/HnSF/Combat/ForceType.cs | 6 +- Assets/HnSF/Combat/HitboxManager.cs | 3 +- .../Fighters/ADV/Scripts/ADVManager.cs | 7 +- .../Shared/States/Base.State.Idle.asset | 205 +----------------- .../Rendering/TDAction URP Pipeline.asset | 46 ++-- .../Fighter/Managers/FighterStateManager.cs | 18 +- .../Conditions/BaseConditionFunctions.cs | 18 +- .../State/FighterStateMachineContext.cs | 7 + .../State/FighterStateMachineContext.cs.meta | 11 + .../State/Functions/BaseStateFunctions.cs | 32 ++- .../Scripts/State/StateConditionMapper.cs | 8 +- .../Scripts/State/StateFunctionMapper.cs | 8 +- Assets/HnSF/State/StateConditionMapperBase.cs | 24 +- Assets/HnSF/State/StateFunctionContext.cs | 8 + .../HnSF/State/StateFunctionContext.cs.meta | 11 + Assets/HnSF/State/StateFunctionMapperBase.cs | 27 ++- Assets/HnSF/State/StateMachineContext.cs | 7 + Assets/HnSF/State/StateMachineContext.cs.meta | 11 + Assets/HnSF/State/StateTimeline.cs | 2 - HnSF.TDAction.csproj | 1 + HnSF.csproj | 2 + ProjectSettings/ProjectSettings.asset | 95 ++++++-- UserSettings/Layouts/default-2022.dwlt | 38 ++-- 24 files changed, 263 insertions(+), 336 deletions(-) create mode 100644 Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs create mode 100644 Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs.meta create mode 100644 Assets/HnSF/State/StateFunctionContext.cs create mode 100644 Assets/HnSF/State/StateFunctionContext.cs.meta create mode 100644 Assets/HnSF/State/StateMachineContext.cs create mode 100644 Assets/HnSF/State/StateMachineContext.cs.meta diff --git a/Assets/HnSF/Combat/Boxes/Hurtbox/HurtboxGroup.cs b/Assets/HnSF/Combat/Boxes/Hurtbox/HurtboxGroup.cs index 7cac6c7d..9ebbbf54 100644 --- a/Assets/HnSF/Combat/Boxes/Hurtbox/HurtboxGroup.cs +++ b/Assets/HnSF/Combat/Boxes/Hurtbox/HurtboxGroup.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using UnityEditor; +using System.Collections.Generic; using UnityEngine; namespace HnSF.Combat diff --git a/Assets/HnSF/Combat/ForceType.cs b/Assets/HnSF/Combat/ForceType.cs index 5246d50e..9f9adcf0 100644 --- a/Assets/HnSF/Combat/ForceType.cs +++ b/Assets/HnSF/Combat/ForceType.cs @@ -1,8 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace HnSF.Combat +namespace HnSF.Combat { public enum ForceType { diff --git a/Assets/HnSF/Combat/HitboxManager.cs b/Assets/HnSF/Combat/HitboxManager.cs index 3b9ca1df..260070d6 100644 --- a/Assets/HnSF/Combat/HitboxManager.cs +++ b/Assets/HnSF/Combat/HitboxManager.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using UnityEngine; diff --git a/Assets/HnSF/Samples/TDAction/Fighters/ADV/Scripts/ADVManager.cs b/Assets/HnSF/Samples/TDAction/Fighters/ADV/Scripts/ADVManager.cs index c48283bb..6237a834 100644 --- a/Assets/HnSF/Samples/TDAction/Fighters/ADV/Scripts/ADVManager.cs +++ b/Assets/HnSF/Samples/TDAction/Fighters/ADV/Scripts/ADVManager.cs @@ -1,8 +1,3 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - namespace HnSF.Sample.TDAction { public class ADVManager : FighterManager @@ -10,7 +5,7 @@ public class ADVManager : FighterManager public override void Start() { base.Start(); - StateManager.ChangeState((int)BaseStateEnum.IDLE); + StateManager.ChangeState((int)BaseStateEnum.FALL); } } } \ No newline at end of file diff --git a/Assets/HnSF/Samples/TDAction/Fighters/Shared/States/Base.State.Idle.asset b/Assets/HnSF/Samples/TDAction/Fighters/Shared/States/Base.State.Idle.asset index ddc56ad4..f490efb5 100644 --- a/Assets/HnSF/Samples/TDAction/Fighters/Shared/States/Base.State.Idle.asset +++ b/Assets/HnSF/Samples/TDAction/Fighters/Shared/States/Base.State.Idle.asset @@ -19,208 +19,7 @@ MonoBehaviour: autoIncrement: 1 autoLoop: 1 autoLoopFrame: 1 - data: - - rid: 1200828956845539343 - - rid: 1200828957409673216 - - rid: 1200828956845539345 - - rid: 1200828956845539352 - - rid: 1200828956845539353 - - rid: 1200828956845539351 - - rid: 1200828961006288896 - - rid: 1200828961006288897 - - rid: 1200828961006288898 - - rid: 1200828961006288899 - - rid: 1200828961006288901 - - rid: 1200828961006288903 + data: [] references: version: 2 - RefIds: - - rid: -2 - type: {class: , ns: , asm: } - - rid: 1200828956845539343 - type: {class: ChangeState, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 0 - frameRanges: [] - condition: - rid: -2 - stateMovesetID: 0 - stateID: 0 - parent: -1 - children: 0200000009000000 - - rid: 1200828956845539345 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 2 - frameRanges: - - {x: 2, y: 4} - condition: - rid: -2 - value: 0 - parent: 0 - children: - - rid: 1200828956845539351 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 5 - frameRanges: - - {x: 2, y: 4} - - {x: 8, y: 9} - condition: - rid: 1200828956845539355 - value: 5 - parent: 3 - children: - - rid: 1200828956845539352 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 3 - frameRanges: - - {x: 2, y: 4} - condition: - rid: -2 - value: 0 - parent: 1 - children: 0400000005000000 - - rid: 1200828956845539353 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 4 - frameRanges: - - {x: 2, y: 4} - condition: - rid: -2 - value: 0 - parent: 3 - children: - - rid: 1200828956845539355 - type: {class: ConditionButton, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - button: 3 - buttonState: 0 - offset: 0 - buffer: 322 - - rid: 1200828957409673216 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 1 - frameRanges: - - {x: 2, y: 4} - - {x: 8, y: 9} - condition: - rid: 1200828957409673217 - value: 0 - parent: -1 - children: 0300000006000000 - - rid: 1200828957409673217 - type: {class: ConditionButton, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - button: 6 - buttonState: 0 - offset: 0 - buffer: 0 - - rid: 1200828961006288896 - type: {class: VarApplyGravity, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 6 - frameRanges: [] - condition: - rid: -2 - useMaxFallSpeedStat: 0 - useGravityStat: 0 - maxFallSpeed: 0 - gravity: 0 - parent: 1 - children: 07000000 - - rid: 1200828961006288897 - type: {class: VarApplyTraction, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 7 - frameRanges: [] - condition: - rid: -2 - useTractionStat: 0 - aerialTraction: 0 - traction: 0 - parent: 6 - children: 0a000000 - - rid: 1200828961006288898 - type: {class: ChangeState, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 8 - frameRanges: [] - condition: - rid: -2 - stateMovesetID: 0 - stateID: 0 - parent: -1 - children: 0b000000 - - rid: 1200828961006288899 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 9 - frameRanges: - - {x: 2, y: 4} - - {x: 8, y: 9} - condition: - rid: 1200828961006288900 - value: 5 - parent: 0 - children: - - rid: 1200828961006288900 - type: {class: ConditionButton, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - button: 3 - buttonState: 0 - offset: 0 - buffer: 322 - - rid: 1200828961006288901 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 10 - frameRanges: - - {x: 2, y: 4} - - {x: 8, y: 9} - condition: - rid: 1200828961006288902 - value: 5 - parent: 7 - children: - - rid: 1200828961006288902 - type: {class: ConditionButton, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - button: 3 - buttonState: 0 - offset: 0 - buffer: 322 - - rid: 1200828961006288903 - type: {class: VarSetFallSpeed, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - name: - id: 11 - frameRanges: - - {x: 2, y: 4} - - {x: 8, y: 9} - condition: - rid: 1200828961006288904 - value: 5 - parent: 8 - children: - - rid: 1200828961006288904 - type: {class: ConditionButton, ns: HnSF.Sample.TDAction.State, asm: HnSF.TDAction} - data: - button: 3 - buttonState: 0 - offset: 0 - buffer: 322 + RefIds: [] diff --git a/Assets/HnSF/Samples/TDAction/Rendering/TDAction URP Pipeline.asset b/Assets/HnSF/Samples/TDAction/Rendering/TDAction URP Pipeline.asset index 580d083c..55ebc450 100644 --- a/Assets/HnSF/Samples/TDAction/Rendering/TDAction URP Pipeline.asset +++ b/Assets/HnSF/Samples/TDAction/Rendering/TDAction URP Pipeline.asset @@ -82,29 +82,29 @@ MonoBehaviour: m_Textures: blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3} bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3} - m_PrefilteringModeMainLightShadows: 1 + m_PrefilteringModeMainLightShadows: 4 m_PrefilteringModeAdditionalLight: 4 - m_PrefilteringModeAdditionalLightShadows: 1 - m_PrefilterXRKeywords: 0 - m_PrefilteringModeForwardPlus: 1 - m_PrefilteringModeDeferredRendering: 1 - m_PrefilteringModeScreenSpaceOcclusion: 1 - m_PrefilterDebugKeywords: 0 - m_PrefilterWriteRenderingLayers: 0 - m_PrefilterHDROutput: 0 - m_PrefilterSSAODepthNormals: 0 - m_PrefilterSSAOSourceDepthLow: 0 - m_PrefilterSSAOSourceDepthMedium: 0 - m_PrefilterSSAOSourceDepthHigh: 0 - m_PrefilterSSAOInterleaved: 0 - m_PrefilterSSAOBlueNoise: 0 - m_PrefilterSSAOSampleCountLow: 0 - m_PrefilterSSAOSampleCountMedium: 0 - m_PrefilterSSAOSampleCountHigh: 0 - m_PrefilterDBufferMRT1: 0 - m_PrefilterDBufferMRT2: 0 - m_PrefilterDBufferMRT3: 0 - m_PrefilterScreenCoord: 0 - m_PrefilterNativeRenderPass: 0 + m_PrefilteringModeAdditionalLightShadows: 0 + m_PrefilterXRKeywords: 1 + m_PrefilteringModeForwardPlus: 0 + m_PrefilteringModeDeferredRendering: 0 + m_PrefilteringModeScreenSpaceOcclusion: 0 + m_PrefilterDebugKeywords: 1 + m_PrefilterWriteRenderingLayers: 1 + m_PrefilterHDROutput: 1 + m_PrefilterSSAODepthNormals: 1 + m_PrefilterSSAOSourceDepthLow: 1 + m_PrefilterSSAOSourceDepthMedium: 1 + m_PrefilterSSAOSourceDepthHigh: 1 + m_PrefilterSSAOInterleaved: 1 + m_PrefilterSSAOBlueNoise: 1 + m_PrefilterSSAOSampleCountLow: 1 + m_PrefilterSSAOSampleCountMedium: 1 + m_PrefilterSSAOSampleCountHigh: 1 + m_PrefilterDBufferMRT1: 1 + m_PrefilterDBufferMRT2: 1 + m_PrefilterDBufferMRT3: 1 + m_PrefilterScreenCoord: 1 + m_PrefilterNativeRenderPass: 1 m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 diff --git a/Assets/HnSF/Samples/TDAction/Scripts/Fighter/Managers/FighterStateManager.cs b/Assets/HnSF/Samples/TDAction/Scripts/Fighter/Managers/FighterStateManager.cs index c102f389..9f3b26ff 100644 --- a/Assets/HnSF/Samples/TDAction/Scripts/Fighter/Managers/FighterStateManager.cs +++ b/Assets/HnSF/Samples/TDAction/Scripts/Fighter/Managers/FighterStateManager.cs @@ -1,11 +1,8 @@ using System; -using System.Collections; -using System.Collections.Generic; using HnSF.Combat; using HnSF.Fighters; using HnSF.Sample.TDAction.State; using UnityEngine; -using UnityEngine.Playables; namespace HnSF.Sample.TDAction { @@ -31,6 +28,15 @@ public int MovesetCount [NonSerialized] public StateFunctionMapper functionMapperBase = new StateFunctionMapper(); [NonSerialized] public StateConditionMapper conditionMapperBase = new StateConditionMapper(); + private FighterStateMachineContext smContext = new FighterStateMachineContext(); + + private void Awake() + { + smContext.fighter = fighterManager; + functionMapperBase = new StateFunctionMapper(); + conditionMapperBase = new StateConditionMapper(); + } + public void Tick() { if (markedForStateChange) @@ -85,9 +91,11 @@ private void ProcessStateVariables(StateTimeline timeline, IStateVariables d, in if (!valid) return; var varType = d.GetType(); - if (!conditionMapperBase.TryCondition(varType, fighterManager, d.Condition, timeline, realFrame)) return; - functionMapperBase.functions[varType](fighterManager, d, timeline, realFrame, (float)(realFrame - frStart) / (float)(frEnd - frStart)); + var sfContext = new StateFunctionContext() { currentFrame = realFrame, frameRangePercent = (float)(realFrame - frStart) / (float)(frEnd - frStart), }; + if (d.Condition != null && !conditionMapperBase.TryCondition(d.Condition.GetType(), d.Condition, timeline, smContext, sfContext)) return; + functionMapperBase.functions[varType](d, timeline, smContext, sfContext); + if (d.Children is null) return; foreach (var childID in d.Children) { ProcessStateVariables(timeline, timeline.data[timeline.stateVariablesIDMap[childID]], realFrame, totalFrames); diff --git a/Assets/HnSF/Samples/TDAction/Scripts/State/Conditions/BaseConditionFunctions.cs b/Assets/HnSF/Samples/TDAction/Scripts/State/Conditions/BaseConditionFunctions.cs index 86737276..d692461b 100644 --- a/Assets/HnSF/Samples/TDAction/Scripts/State/Conditions/BaseConditionFunctions.cs +++ b/Assets/HnSF/Samples/TDAction/Scripts/State/Conditions/BaseConditionFunctions.cs @@ -2,18 +2,20 @@ using HnSF.Sample.TDAction.State; using UnityEngine; + namespace HnSF.Sample.TDAction { public class BaseConditionFunctions { - public static bool NoCondition(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4) + public static bool NoCondition(IConditionVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext sfContext) { return true; } - public static bool MovementSqrMagnitude(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4) + public static bool MovementSqrMagnitude(IConditionVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext sfContext) { - FighterInputManager inputManager = ((FighterManager)fighter).InputManager; + var smc = smContext as FighterStateMachineContext; + FighterInputManager inputManager = smc.fighter.InputManager; ConditionMovementMagnitude vars = (ConditionMovementMagnitude)variables; Vector2 movement = inputManager.GetMovement(0); @@ -21,9 +23,10 @@ public static bool MovementSqrMagnitude(IFighterBase fighter, IConditionVariable return r; } - public static bool FallSpeed(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4) + public static bool FallSpeed(IConditionVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext sfContext) { - FighterPhysicsManager physicsManager = ((FighterManager)fighter).physicsManager; + var smc = smContext as FighterStateMachineContext; + FighterPhysicsManager physicsManager = smc.fighter.physicsManager; ConditionFallSpeed vars = (ConditionFallSpeed)variables; bool r = false; @@ -38,11 +41,12 @@ public static bool FallSpeed(IFighterBase fighter, IConditionVariables variables return r; } - public static bool GroundedState(IFighterBase fighter, IConditionVariables variables, HnSF.StateTimeline arg3, int arg4) + public static bool GroundedState(IConditionVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext sfContext) { + var smc = smContext as FighterStateMachineContext; ConditionGroundState vars = (ConditionGroundState)variables; - bool r = fighter.PhysicsManager.IsGrounded; + bool r = smc.fighter.PhysicsManager.IsGrounded; if (vars.inverse) r = !r; return r; } diff --git a/Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs b/Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs new file mode 100644 index 00000000..fbd5a49c --- /dev/null +++ b/Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs @@ -0,0 +1,7 @@ +namespace HnSF.Sample.TDAction +{ + public class FighterStateMachineContext : StateMachineContext + { + public FighterManager fighter; + } +} \ No newline at end of file diff --git a/Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs.meta b/Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs.meta new file mode 100644 index 00000000..e1745ff5 --- /dev/null +++ b/Assets/HnSF/Samples/TDAction/Scripts/State/FighterStateMachineContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5be3865a609820f44bace7b8254ef098 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HnSF/Samples/TDAction/Scripts/State/Functions/BaseStateFunctions.cs b/Assets/HnSF/Samples/TDAction/Scripts/State/Functions/BaseStateFunctions.cs index 135428a1..960e8da5 100644 --- a/Assets/HnSF/Samples/TDAction/Scripts/State/Functions/BaseStateFunctions.cs +++ b/Assets/HnSF/Samples/TDAction/Scripts/State/Functions/BaseStateFunctions.cs @@ -1,45 +1,41 @@ -using System.Collections; -using System.Collections.Generic; -using HnSF.Fighters; -using UnityEngine; - namespace HnSF.Sample.TDAction { public static class BaseStateFunctions { - public static void ChangeState(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int currentFrame, float frameRangePercent) + public static void ChangeState(IStateVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext context) { + var smc = smContext as FighterStateMachineContext; State.ChangeState vars = (State.ChangeState)variables; - fighter.StateManager.MarkForStateChange(vars.stateID, vars.stateMovesetID); + smc.fighter.StateManager.MarkForStateChange(vars.stateID, vars.stateMovesetID); } - public static void ApplyGravity(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int currentFrame, float frameRangePercent) + public static void ApplyGravity(IStateVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext context) { + var smc = smContext as FighterStateMachineContext; State.VarApplyGravity vars = (State.VarApplyGravity)variables; - FighterManager fm = (FighterManager)fighter; - fm.physicsManager.ApplyGravity(vars.useMaxFallSpeedStat ? fm.statManager.maxFallSpeed : vars.maxFallSpeed, - vars.useGravityStat ? fm.statManager.gravity : vars.gravity); + smc.fighter.physicsManager.ApplyGravity(vars.useMaxFallSpeedStat ? smc.fighter.statManager.maxFallSpeed : vars.maxFallSpeed, + vars.useGravityStat ? smc.fighter.statManager.gravity : vars.gravity); } - public static void ApplyTraction(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int currentFrame, float frameRangePercent) + public static void ApplyTraction(IStateVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext context) { + var smc = smContext as FighterStateMachineContext; State.VarApplyTraction vars = (State.VarApplyTraction)variables; - FighterManager fm = (FighterManager)fighter; if (vars.useTractionStat) { - fm.physicsManager.ApplyFriction(vars.aerialTraction ? fm.statManager.aerialTraction : fm.statManager.groundTraction); + smc.fighter.physicsManager.ApplyFriction(vars.aerialTraction ? smc.fighter.statManager.aerialTraction : smc.fighter.statManager.groundTraction); } else { - fm.physicsManager.ApplyFriction(vars.traction); + smc.fighter.physicsManager.ApplyFriction(vars.traction); } } - public static void SetFallSpeed(IFighterBase fighter, IStateVariables variables, HnSF.StateTimeline arg3, int currentFrame, float frameRangePercent) + public static void SetFallSpeed(IStateVariables variables, HnSF.StateTimeline timeline, StateMachineContext smContext, StateFunctionContext context) { + var smc = smContext as FighterStateMachineContext; State.VarSetFallSpeed vars = (State.VarSetFallSpeed)variables; - FighterManager fm = (FighterManager)fighter; - fm.physicsManager.SetFallSpeed(vars.value); + smc.fighter.physicsManager.SetFallSpeed(vars.value); } } } \ No newline at end of file diff --git a/Assets/HnSF/Samples/TDAction/Scripts/State/StateConditionMapper.cs b/Assets/HnSF/Samples/TDAction/Scripts/State/StateConditionMapper.cs index 26a80ef8..ebae39ee 100644 --- a/Assets/HnSF/Samples/TDAction/Scripts/State/StateConditionMapper.cs +++ b/Assets/HnSF/Samples/TDAction/Scripts/State/StateConditionMapper.cs @@ -4,10 +4,10 @@ public class StateConditionMapper : StateConditionMapperBase { public StateConditionMapper() { - functions.Add(typeof(ConditionNone), BaseConditionFunctions.NoCondition); - functions.Add(typeof(ConditionMovementMagnitude), BaseConditionFunctions.MovementSqrMagnitude); - functions.Add(typeof(ConditionGroundState), BaseConditionFunctions.GroundedState); - functions.Add(typeof(ConditionFallSpeed), BaseConditionFunctions.FallSpeed); + RegisterCondition(typeof(ConditionNone), BaseConditionFunctions.NoCondition); + RegisterCondition(typeof(ConditionMovementMagnitude), BaseConditionFunctions.MovementSqrMagnitude); + RegisterCondition(typeof(ConditionGroundState), BaseConditionFunctions.GroundedState); + RegisterCondition(typeof(ConditionFallSpeed), BaseConditionFunctions.FallSpeed); } } } \ No newline at end of file diff --git a/Assets/HnSF/Samples/TDAction/Scripts/State/StateFunctionMapper.cs b/Assets/HnSF/Samples/TDAction/Scripts/State/StateFunctionMapper.cs index 75eeace7..3d771f68 100644 --- a/Assets/HnSF/Samples/TDAction/Scripts/State/StateFunctionMapper.cs +++ b/Assets/HnSF/Samples/TDAction/Scripts/State/StateFunctionMapper.cs @@ -6,10 +6,10 @@ public class StateFunctionMapper : StateFunctionMapperBase { public StateFunctionMapper() { - functions.Add(typeof(State.ChangeState), BaseStateFunctions.ChangeState); - functions.Add(typeof(State.VarApplyGravity), BaseStateFunctions.ApplyGravity); - functions.Add(typeof(State.VarApplyTraction), BaseStateFunctions.ApplyTraction); - functions.Add(typeof(State.VarSetFallSpeed), BaseStateFunctions.SetFallSpeed); + functions.Add(typeof(ChangeState), BaseStateFunctions.ChangeState); + functions.Add(typeof(VarApplyGravity), BaseStateFunctions.ApplyGravity); + functions.Add(typeof(VarApplyTraction), BaseStateFunctions.ApplyTraction); + functions.Add(typeof(VarSetFallSpeed), BaseStateFunctions.SetFallSpeed); } } } \ No newline at end of file diff --git a/Assets/HnSF/State/StateConditionMapperBase.cs b/Assets/HnSF/State/StateConditionMapperBase.cs index fdb66e76..d3826f4d 100644 --- a/Assets/HnSF/State/StateConditionMapperBase.cs +++ b/Assets/HnSF/State/StateConditionMapperBase.cs @@ -1,41 +1,49 @@ using System; using System.Collections.Generic; -using HnSF.Fighters; namespace HnSF { [System.Serializable] public class StateConditionMapperBase { - public Dictionary> functions = - new Dictionary>(); + public Dictionary> functions = new(); - public virtual bool TryRegisterCondition(Type id, Func condition) + public virtual bool TryRegisterCondition(Type id, Func condition) { if (functions.ContainsKey(id)) return false; functions.Add(id, condition); return true; } - public virtual void RegisterCondition(Type id, Func condition) + public virtual void RegisterCondition(Type id, Func condition) { functions.Add(id, condition); } - public virtual bool OverrideCondition(Type id, Func condition) + public virtual bool OverrideCondition(Type id, Func condition) { functions[id] = condition; return true; } + public virtual void RegisterOrOverrideCondition(Type id, Func condition) + { + if (functions.ContainsKey(id)) + { + functions[id] = condition; + return; + } + functions.Add(id, condition); + } + public virtual void RemoveCondition(Type id) { functions.Remove(id); } - public virtual bool TryCondition(Type id, IFighterBase fighter, IConditionVariables variables, StateTimeline timeline, int frame) + public virtual bool TryCondition(Type id, IConditionVariables variables, StateTimeline timeline, StateMachineContext smContext, StateFunctionContext sfContext) { - return functions[id](fighter, variables, timeline, frame); + return functions[id](variables, timeline, smContext, sfContext); } } } \ No newline at end of file diff --git a/Assets/HnSF/State/StateFunctionContext.cs b/Assets/HnSF/State/StateFunctionContext.cs new file mode 100644 index 00000000..2f910e57 --- /dev/null +++ b/Assets/HnSF/State/StateFunctionContext.cs @@ -0,0 +1,8 @@ +namespace HnSF +{ + public partial struct StateFunctionContext + { + public int currentFrame; + public float frameRangePercent; + } +} \ No newline at end of file diff --git a/Assets/HnSF/State/StateFunctionContext.cs.meta b/Assets/HnSF/State/StateFunctionContext.cs.meta new file mode 100644 index 00000000..112408d1 --- /dev/null +++ b/Assets/HnSF/State/StateFunctionContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2d868942531d10f47a079d2f505389d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HnSF/State/StateFunctionMapperBase.cs b/Assets/HnSF/State/StateFunctionMapperBase.cs index bc78f3bf..b4ed18a1 100644 --- a/Assets/HnSF/State/StateFunctionMapperBase.cs +++ b/Assets/HnSF/State/StateFunctionMapperBase.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using HnSF.Fighters; namespace HnSF { @@ -8,32 +7,46 @@ namespace HnSF public class StateFunctionMapperBase { /// - /// IFighterBase, IStateVariables, StateTimeline, Current Frame, Frame Range % + /// IStateVariables, StateTimeline /// - public Dictionary> functions = - new Dictionary>(); + public Dictionary> functions = new(); - public virtual bool TryRegisterFunction(Type id, Action function) + public virtual bool TryRegisterFunction(Type id, Action function) { if (functions.ContainsKey(id)) return false; functions.Add(id, function); return true; } - public virtual void RegisterFunction(Type id, Action function) + public virtual void RegisterFunction(Type id, Action function) { functions.Add(id, function); } - public virtual bool OverrideFunction(Type id, Action function) + public virtual bool OverrideFunction(Type id, Action function) { functions[id] = function; return true; } + public virtual void RegisterOrOverrideFunction(Type id, Action function) + { + if (functions.ContainsKey(id)) + { + functions[id] = function; + return; + } + functions.Add(id, function); + } + public virtual void RemoveFunction(Type id) { functions.Remove(id); } + + public virtual void TryFunction(Type id, IStateVariables variables, StateTimeline timeline, StateMachineContext smContext, StateFunctionContext sfContext) + { + functions[id](variables, timeline, smContext, sfContext); + } } } \ No newline at end of file diff --git a/Assets/HnSF/State/StateMachineContext.cs b/Assets/HnSF/State/StateMachineContext.cs new file mode 100644 index 00000000..ff14d2e8 --- /dev/null +++ b/Assets/HnSF/State/StateMachineContext.cs @@ -0,0 +1,7 @@ +namespace HnSF +{ + public class StateMachineContext + { + + } +} \ No newline at end of file diff --git a/Assets/HnSF/State/StateMachineContext.cs.meta b/Assets/HnSF/State/StateMachineContext.cs.meta new file mode 100644 index 00000000..e1b7ad2f --- /dev/null +++ b/Assets/HnSF/State/StateMachineContext.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7391fb5a0a123fa4788f0037326a69c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/HnSF/State/StateTimeline.cs b/Assets/HnSF/State/StateTimeline.cs index 77b95908..af3333ef 100644 --- a/Assets/HnSF/State/StateTimeline.cs +++ b/Assets/HnSF/State/StateTimeline.cs @@ -1,8 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Runtime.InteropServices; -using UnityEditor; using UnityEngine; namespace HnSF diff --git a/HnSF.TDAction.csproj b/HnSF.TDAction.csproj index 2f86f74d..7f7640ba 100644 --- a/HnSF.TDAction.csproj +++ b/HnSF.TDAction.csproj @@ -60,6 +60,7 @@ + diff --git a/HnSF.csproj b/HnSF.csproj index 5eca499e..3108297a 100644 --- a/HnSF.csproj +++ b/HnSF.csproj @@ -72,8 +72,10 @@ + + diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 1b67f43f..66e600a3 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 22 + serializedVersion: 26 productGUID: 2c47fe2535572a34ea367dc71bd76ea2 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -48,14 +48,15 @@ PlayerSettings: defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 m_ActiveColorSpace: 1 + m_SpriteBatchVertexThreshold: 300 m_MTRendering: 1 mipStripping: 0 numberOfMipsStripped: 0 + numberOfMipsStrippedPerMipmapLimitGroup: {} m_StackTraceTypes: 010000000100000001000000010000000100000001000000 iosShowActivityIndicatorOnLoading: -1 androidShowActivityIndicatorOnLoading: -1 iosUseCustomAppBackgroundBehavior: 0 - iosAllowHTTPDownload: 1 allowedAutorotateToPortrait: 1 allowedAutorotateToPortraitUpsideDown: 1 allowedAutorotateToLandscapeRight: 1 @@ -85,6 +86,7 @@ PlayerSettings: hideHomeButton: 0 submitAnalytics: 1 usePlayerLog: 1 + dedicatedServerOptimizations: 0 bakeCollisionMeshes: 0 forceSingleInstance: 0 useFlipModelSwapchain: 1 @@ -119,8 +121,12 @@ PlayerSettings: switchNVNShaderPoolsGranularity: 33554432 switchNVNDefaultPoolsGranularity: 16777216 switchNVNOtherPoolsGranularity: 16777216 + switchGpuScratchPoolGranularity: 2097152 + switchAllowGpuScratchShrinking: 0 switchNVNMaxPublicTextureIDCount: 0 switchNVNMaxPublicSamplerIDCount: 0 + switchNVNGraphicsFirmwareMemory: 32 + switchMaxWorkerMultiple: 8 stadiaPresentMode: 0 stadiaTargetFramerate: 0 vulkanNumSwapchainBuffers: 3 @@ -128,12 +134,7 @@ PlayerSettings: vulkanEnablePreTransform: 0 vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 - m_SupportedAspectRatios: - 4:3: 1 - 5:4: 1 - 16:10: 1 - 16:9: 1 - Others: 1 + loadStoreDebugModeEnabled: 0 bundleVersion: 0.1 preloadedAssets: [] metroInputSource: 0 @@ -145,22 +146,25 @@ PlayerSettings: enable360StereoCapture: 0 isWsaHolographicRemotingEnabled: 0 enableFrameTimingStats: 0 + enableOpenGLProfilerGPURecorders: 1 useHDRDisplay: 0 - D3DHDRBitDepth: 0 + hdrBitDepth: 0 m_ColorGamuts: 0000000003000000 targetPixelDensity: 30 resolutionScalingMode: 0 + resetResolutionOnWindowResize: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: Standalone: com.ChrisTides11.HnSF buildNumber: Standalone: 0 + VisionOS: 0 iPhone: 0 tvOS: 0 overrideDefaultApplicationIdentifier: 0 AndroidBundleVersionCode: 1 - AndroidMinSdkVersion: 19 + AndroidMinSdkVersion: 22 AndroidTargetSdkVersion: 0 AndroidPreferredInstallLocation: 1 aotOptions: @@ -173,12 +177,15 @@ PlayerSettings: APKExpansionFiles: 0 keepLoadedShadersAlive: 0 StripUnusedMeshComponents: 0 + strictShaderVariantMatching: 0 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iOSTargetOSVersionString: 11.0 + iOSTargetOSVersionString: 12.0 tvOSSdkVersion: 0 tvOSRequireExtendedGameController: 0 - tvOSTargetOSVersionString: 11.0 + tvOSTargetOSVersionString: 12.0 + VisionOSSdkVersion: 0 + VisionOSTargetOSVersionString: 1.0 uIPrerenderedIcon: 0 uIRequiresPersistentWiFi: 0 uIRequiresFullScreen: 1 @@ -216,6 +223,7 @@ PlayerSettings: iOSLaunchScreeniPadCustomStoryboardPath: iOSDeviceRequirements: [] iOSURLSchemes: [] + macOSURLSchemes: [] iOSBackgroundModes: 0 iOSMetalForceHardShadows: 0 metalEditorSupport: 1 @@ -225,8 +233,10 @@ PlayerSettings: appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: + VisionOSManualSigningProvisioningProfileID: iOSManualSigningProvisioningProfileType: 0 tvOSManualSigningProvisioningProfileType: 0 + VisionOSManualSigningProvisioningProfileType: 0 appleEnableAutomaticSigning: 0 iOSRequireARKit: 0 iOSAutomaticallyDetectAndAddCapabilities: 1 @@ -241,6 +251,7 @@ PlayerSettings: useCustomLauncherGradleManifest: 0 useCustomBaseGradleTemplate: 0 useCustomGradlePropertiesTemplate: 0 + useCustomGradleSettingsTemplate: 0 useCustomProguardFile: 0 AndroidTargetArchitectures: 1 AndroidTargetDevices: 0 @@ -248,6 +259,7 @@ PlayerSettings: androidSplashScreen: {fileID: 0} AndroidKeystoreName: AndroidKeyaliasName: + AndroidEnableArmv9SecurityFeatures: 0 AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 0 AndroidIsGame: 1 @@ -261,7 +273,6 @@ PlayerSettings: banner: {fileID: 0} androidGamepadSupportLevel: 0 chromeosInputEmulation: 1 - AndroidMinifyWithR8: 0 AndroidMinifyRelease: 0 AndroidMinifyDebug: 0 AndroidValidateAppBundleSize: 1 @@ -284,6 +295,7 @@ PlayerSettings: - m_BuildTarget: WebGL m_StaticBatching: 0 m_DynamicBatching: 0 + m_BuildTargetShaderSettings: [] m_BuildTargetGraphicsJobs: - m_BuildTarget: MacStandaloneSupport m_GraphicsJobs: 0 @@ -325,11 +337,13 @@ PlayerSettings: m_Automatic: 1 - m_BuildTarget: AndroidPlayer m_APIs: 150000000b000000 - m_Automatic: 0 + m_Automatic: 1 - m_BuildTarget: WebGLSupport m_APIs: 0b000000 m_Automatic: 0 m_BuildTargetVRSettings: [] + m_DefaultShaderChunkSizeInMB: 16 + m_DefaultShaderChunkCount: 0 openGLRequireES31: 0 openGLRequireES31AEP: 0 openGLRequireES32: 0 @@ -341,8 +355,13 @@ PlayerSettings: m_BuildTargetGroupLightmapEncodingQuality: - m_BuildTarget: Standalone m_EncodingQuality: 1 + m_BuildTargetGroupHDRCubemapEncodingQuality: + - m_BuildTarget: Standalone + m_EncodingQuality: 2 m_BuildTargetGroupLightmapSettings: [] + m_BuildTargetGroupLoadStoreDebugModeSettings: [] m_BuildTargetNormalMapEncoding: [] + m_BuildTargetDefaultTextureCompressionFormat: [] playModeTestRunnerEnabled: 0 runPlayModeTestAsEditModeTest: 0 actionOnDotNetUnhandledException: 1 @@ -353,6 +372,7 @@ PlayerSettings: locationUsageDescription: microphoneUsageDescription: bluetoothUsageDescription: + macOSTargetOSVersion: 10.13.0 switchNMETAOverride: switchNetLibKey: switchSocketMemoryPoolSize: 6144 @@ -361,8 +381,10 @@ PlayerSettings: switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 switchUseGOLDLinker: 0 + switchLTOSetting: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: + switchCompilerFlags: switchTitleNames_0: switchTitleNames_1: switchTitleNames_2: @@ -436,7 +458,6 @@ PlayerSettings: switchReleaseVersion: 0 switchDisplayVersion: 1.0.0 switchStartupUserAccount: 0 - switchTouchScreenUsage: 0 switchSupportedLanguagesMask: 0 switchLogoType: 0 switchApplicationErrorCodeCategory: @@ -478,6 +499,7 @@ PlayerSettings: switchNativeFsCacheSize: 32 switchIsHoldTypeHorizontal: 0 switchSupportedNpadCount: 8 + switchEnableTouchScreen: 1 switchSocketConfigEnabled: 0 switchTcpInitialSendBufferSize: 32 switchTcpInitialReceiveBufferSize: 64 @@ -490,8 +512,11 @@ PlayerSettings: switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 switchUseNewStyleFilepaths: 0 + switchUseLegacyFmodPriorities: 0 switchUseMicroSleepForYield: 1 + switchEnableRamDiskSupport: 0 switchMicroSleepForYieldTime: 25 + switchRamDiskSpaceSize: 12 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -586,6 +611,7 @@ PlayerSettings: webGLMemorySize: 16 webGLExceptionSupport: 1 webGLNameFilesAsHashes: 0 + webGLShowDiagnostics: 0 webGLDataCaching: 1 webGLDebugSymbols: 0 webGLEmscriptenArgs: @@ -598,24 +624,43 @@ PlayerSettings: webGLLinkerTarget: 1 webGLThreadsSupport: 0 webGLDecompressionFallback: 0 + webGLInitialMemorySize: 32 + webGLMaximumMemorySize: 2048 + webGLMemoryGrowthMode: 2 + webGLMemoryLinearGrowthStep: 16 + webGLMemoryGeometricGrowthStep: 0.2 + webGLMemoryGeometricGrowthCap: 96 + webGLPowerPreference: 2 scriptingDefineSymbols: - 1: + Standalone: additionalCompilerArguments: {} platformArchitecture: {} scriptingBackend: Standalone: 0 il2cppCompilerConfiguration: {} - managedStrippingLevel: {} + il2cppCodeGeneration: {} + managedStrippingLevel: + EmbeddedLinux: 1 + GameCoreScarlett: 1 + GameCoreXboxOne: 1 + Nintendo Switch: 1 + PS4: 1 + PS5: 1 + QNX: 1 + Stadia: 1 + VisionOS: 1 + WebGL: 1 + Windows Store Apps: 1 + XboxOne: 1 + iPhone: 1 + tvOS: 1 incrementalIl2cppBuild: {} suppressCommonWarnings: 1 allowUnsafeCode: 0 useDeterministicCompilation: 1 - useReferenceAssemblies: 1 - enableRoslynAnalyzers: 1 additionalIl2CppArgs: scriptingRuntimeVersion: 1 gcIncremental: 0 - assemblyVersionValidation: 1 gcWBarrierValidation: 0 apiCompatibilityLevelPerPlatform: Standalone: 3 @@ -649,6 +694,7 @@ PlayerSettings: metroFTAName: metroFTAFileTypes: [] metroProtocolName: + vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -690,8 +736,14 @@ PlayerSettings: luminVersion: m_VersionCode: 1 m_VersionName: + hmiPlayerDataPath: + hmiForceSRGBBlit: 1 + embeddedLinuxEnableGamepadInput: 1 + hmiLogStartupTiming: 0 + hmiCpuConfiguration: apiCompatibilityLevel: 6 activeInputHandler: 2 + windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 qualitySettingsNames: [] @@ -699,4 +751,7 @@ PlayerSettings: organizationId: cloudEnabled: 0 legacyClampBlendShapeWeights: 0 + hmiLoadingImage: {fileID: 0} + platformRequiresReadableAssets: 0 virtualTexturingSupportEnabled: 0 + insecureHttpOption: 0 diff --git a/UserSettings/Layouts/default-2022.dwlt b/UserSettings/Layouts/default-2022.dwlt index 50aef26b..d8334d53 100644 --- a/UserSettings/Layouts/default-2022.dwlt +++ b/UserSettings/Layouts/default-2022.dwlt @@ -19,7 +19,7 @@ MonoBehaviour: width: 2560 height: 1349 m_ShowMode: 4 - m_Title: Hierarchy + m_Title: Inspector m_RootView: {fileID: 6} m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} @@ -68,8 +68,8 @@ MonoBehaviour: y: 0 width: 519 height: 1299 - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 15} m_Panes: - {fileID: 15} @@ -95,8 +95,8 @@ MonoBehaviour: y: 0 width: 495 height: 761 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} m_ActualView: {fileID: 16} m_Panes: - {fileID: 16} @@ -393,7 +393,7 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/HnSF/Samples/TDAction/Scripts/State/Variables + - Assets m_Globs: [] m_OriginalText: m_ImportLogFlags: 0 @@ -401,16 +401,16 @@ MonoBehaviour: m_ViewMode: 1 m_StartGridSize: 16 m_LastFolders: - - Assets/HnSF/Samples/TDAction/Scripts/State/Variables + - Assets m_LastFoldersGridSize: 16 m_LastProjectPath: C:\Projects\Unity\hack-and-slash-framework m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 35} - m_SelectedIDs: 5c6d0000 - m_LastClickedID: 27996 - m_ExpandedIDs: 00000000c66c0000c86c0000ca6c0000cc6c0000ce6c0000d06c0000d26c0000f66c0000366d000000ca9a3b + scrollPos: {x: 0, y: 0} + m_SelectedIDs: ca680000 + m_LastClickedID: 26826 + m_ExpandedIDs: 00000000ca680000ac6a00002c7b000000ca9a3b m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -438,7 +438,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 00000000c66c0000c86c0000ca6c0000cc6c0000ce6c0000d06c0000d26c0000d46c0000 + m_ExpandedIDs: 00000000ca680000cc680000ce680000d0680000d2680000d4680000d6680000d8680000 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -465,22 +465,22 @@ MonoBehaviour: m_ListAreaState: m_SelectedInstanceIDs: m_LastClickedInstanceID: 0 - m_HadKeyboardFocusLastEvent: 1 - m_ExpandedInstanceIDs: c623000000000000 + m_HadKeyboardFocusLastEvent: 0 + m_ExpandedInstanceIDs: c623000000000000f4170000 m_RenameOverlay: m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: + m_Name: StateTimeline + m_OriginalName: StateTimeline m_EditFieldRect: serializedVersion: 2 x: 0 y: 0 width: 0 height: 0 - m_UserData: 0 + m_UserData: 3880 m_IsWaitingForDelay: 0 m_IsRenaming: 0 - m_OriginalEventType: 11 + m_OriginalEventType: 4 m_IsRenamingFilename: 1 m_ClientGUIView: {fileID: 5} m_CreateAssetUtility: @@ -582,7 +582,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 30f0ffff + m_ExpandedIDs: 64c7ffffeac7ffff9cc9ffff12fbffff m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: