public BehaviorTree getBT(BTID id) { if (!m_id2BTDic.ContainsKey(id)) { BehaviorTreeRes res = getAndSyncLoadBT(id); this.unload(res.GetPath(), null); } return(m_id2BTDic[id]); }
override public void dispose() { if (m_btRes != null) { Ctx.m_instance.m_aiSystem.behaviorTreeMgr.unload(m_btRes.GetPath(), null); m_btRes = null; } if (m_bt != null) { m_bt = null; } Ctx.m_instance.m_aiSystem.aiControllerMgr.removeController(this); }