/// <summary> /// Adds a new Object var to the supplied blackboard. /// Automatically handles undo. /// <param name="blackboard">The blackboard to add a new ObjectVar.</param> /// <returns>The new variable.</returns> /// </summary> public static ObjectVar AddObjectVar (InternalBlackboard blackboard) { BlackboardUtility.RegisterVariableUndo(blackboard, "Add Object Variable"); var newVariable = blackboard.AddObjectVar(); EditorUtility.SetDirty(blackboard); return newVariable; }