Access to Text Mesh Pro (and other scripts) from Abilities

Sarr

New member
Hello, thank you for making this well structured controller. I'm working with it well, but now have run into a problem - can't access TMP_Text ("using TMPro;" - namespace is unavailable) and some of my custom scripts from the Abilities.

Accessing those scripts / namespaces is possible once I move an Ability from their default folder (Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/) to my own one, outside of Opsive. The problem is, if I do this, I can't find those Abilities via functions like GetAbility<AbilityName>() and basically any other.

Tried moving TMP via Script Execution Order but Unity doesn't save that, and moving Opsive positions instead doesn't change anything - neither before or past TMP. Then, once I move my ability out of the folder that they should be in, it compiles. Don't really know how to fix it.
I need access to both TMP, my own scripts and also methods like .GetAbility<>().IsActive run on my custom abilities, to check if other custom ones are running.

UPDATE:
Ok, I fixed it by adding Script Assembly References to Text Mesh Pro in Character Controler asmdef in particular order. The side effect I see is my other custom class needs to be either moved into Opsive Character folder (and add more references), or I need to use the UFPS system. So have to make everything that starts an ability based on some condition, like UI button press, via for UFPS classes, which sometimes are overkill for a simple "StartAbility/StopAbilty, update UI" thing. But I understand you had to create a robust system for everyone. Well, let's try your designed way then.
 
Last edited:
Top