UI text in Interact Ability

Haytam95

Active member
Hi, i have just a small catch in Interact.cs ability:

1577331515874.png


string.Format isn't doing anything, it just leaves the original ability message.



Here is the proof:


Left: Interact ability Right: SoundPlayerInteractable (extends Interactable)

1577331821140.png

With string format:


1577331933724.png

With normal concatenation:





With normal concatenation string.Concat() it's working okay (if that is the objective). If the objective is just replace it, maybe just return m_interactable.AbilityMessage();
 
Things look like they are working correctly. String.Format works with curly brackets, not square brackets. In the demo scene the text will change between "PRESS F TO OPEN DOOR" and "PRESS F TO CLOSE DOOR"
 
Top