public BehaviorTree getBT(BTID id) { if (!m_id2BTDic.ContainsKey(id)) { BehaviorTreeRes res = getAndSyncLoadBT(id); this.unload(res.GetPath(), null); } return(m_id2BTDic[id]); }
public BehaviorTreeRes getAndLoadBT(BTID id) { LoadParam param = Ctx.m_instance.m_poolSys.newObject <LoadParam>(); LocalFileSys.modifyLoadParam(m_btAttrSys.m_id2ItemDic[id].m_path, param); param.m_loadNeedCoroutine = false; BehaviorTreeRes ret = getAndLoad <BehaviorTreeRes>(param); Ctx.m_instance.m_poolSys.deleteObj(param); return(ret); }
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); }
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); }