How do you expose variables to the inspector?

ChaosCrazed

New member
For my project, I'm trying to setup a routine system for characters. At certain times on the in-game clock, the NPC goes to a set point, and then runs an External Behavior (by assigning it to the NPC's Behavior Tree component, etc). How can I best get inspector access to easily configure the variables for these external behaviors? The closest I've been able to come to is a list of SharedGameObjects where I have to manually type in the vairable names matching the tree, and assigning the values to the SharedGameObject instance.

In short, how does the inspector for Behavior Trees normally handle showing the tree's variables and allowing for the easy assignment they do?

If it helps, here's the class I've got for a 'task':

C#:
public class Task

    {

        public string taskName;


        public int taskHour;

        public int taskMinute;


        public Waypoint taskPoint;

        public ExternalBehavior taskBehavior;


        public List<SharedGameObject> taskVariables = new List<SharedGameObject>();

    }
 
Last edited:
Top