Values not displaying in Function Library

I’ve begun working on my first Function Library in Blueprints, but have noticed that mousing-over the inputs or outputs on a graph node while debugging doesn’t display the current value, like it does on a character controller or level blueprint. I’m accessing the Function Library function from a behavior tree task (using Event Receive Tick).

Obviously I need to see values when debugging, so is there another way? Or perhaps this is a bug?

(I drew the mouse position in Paint because it doesn’t capture correctly via print screen)

Hi there,

well yep, there are still some issues like you can see in this post.

This is why PrintText (or PrintSring) does a great job. Especially when you work with Timers where you have to face some more or less random “Variable not in Scope” messages when watching values.

Just stick a PrintText or a PrintString for the value in there when you face this issue. Be aware that these Print-Nodes execute the whole calculation and the actual node that needs that value will do the whole calculation over again. No problem, just keep that in mind in case you get confusing output.

At the time where you use the function in multiple places PrintText will be useless of course. And since it is a common habit to stick the “work in progress” function (even from a function library) immediately into the full complexity of code: Here a good practice for those who are not familiar with UnitTesting:

Basically: Test the function on its own!

Create a TestLevel for your libraries, where you simply stick your functions into the EventBeginPlay of the LevelBP or GameMode or wherever. And then you start to feed it with with different and decent input and PrintText the output that you can check in the OutputLog. Faster implemented and debugged. And the easy proof for reliability in different situations makes you happy. No need to debug within the function after that, you just need to check the values before they get in.

Happy debugging :slight_smile: Marooney