public SequenceContext Prepare(SequenceBehaviour sequence = null, TickMode mode = TickMode.Auto) { if (m_Context != null) { m_Context.Dispose(); m_Context = null; } if (sequence != null) { m_Sequence = sequence; } if (m_Sequence == null) { return(null); } m_Context = m_Sequence.CreateContext(Blackboard); return(m_Context); }
public void Dispose() { m_Context?.Dispose(); m_Context = null; }