Reply To: Variable names lost on custom nodes

Forums 💬 NodeCanvas ⚙️ Support Variable names lost on custom nodes Reply To: Variable names lost on custom nodes

#19648
Gavalakis
Keymaster

    Hello,

    Yep, you have to mark them all as [Serializable] 🙂

    By the way:

    – You can just use the [BlackboardOnly] attribute without initializing the BBVariable like {blackboardOnly = true}. This was the old way of doing this and that’s why some tasks still have it which I have not changed yet 🙂

    – You can have your classes in any namespace you want if you have your own ECO namespace for example. They don’t have to be in the NodeCanvas.Variables or NodeCanvas.Actions respectively.

    – In your info property you can use for example abilities.ToString() to get a nice formated text if you want like:
    {return “NPC -> ” + abilities;} You can do this for any BBVariable of course.

    – The agent is a Component type. You can GetComponent from it directly without going through the .transform
    agent.GetComponent().abilities;

    Just saying 🙂

    Cheers!