Visualise ProbabilitySelector

gumboots

Member
Hi there!

I created a ProbabilitySelector that you can find here:

https://pastebin.com/PeujHLgH

However one thing I'd like to be able to do is display each branch's probability in the UI. For example, a little box with the normalized probability value over its entry point, something like that. Is there hooks for this in Behavior Designer? I can't seem to find them, so I'm guessing not. But I thought I'd ask!
 
You could specify it in the comment field:

Code:
#if UNITY_EDITOR
NodeData.Comment = "Prob1: x\nProb2:y";
#endif
 
You could place that within OnUpdate so it'll change whenever the task is active.
 
Oh, sorry, I'm hoping to visualise it in Edit mode. So at a glance I can see the chance of each branch occurring to detect issues quickly.
 
In that case you could place it within OnDrawGizmos. OnDrawGizmos is normally for editor gizmos but it would work for this case as well.
 
Top