Runtime ID updation

maherar

Member
I am using the interact ability but under certain conditions. At the start, the ID is 2 which is correct to perform intractability animation and it runs.
When the condition is not true I am changing the ID value of the "Interactable" component at runtime (giving the wrong ID) to stop the animation till here it works.
after that when the correct ID is updated (I can see this in the inspector) value is changing but the ability and its animation are not performing.
If I cahgne manually at runtime then it works fine.
How can I achieve this target?

1665582581393.png
 
Why are you changing the ID of the interactable? This sounds a little strange.
You can try calling
Code:
m_CharacterLocomotion.UpdateAbilityAnimatorParameters()
to update the animator parameters.
 
Top