コード例 #1
0
        // Token: 0x0600056E RID: 1390 RVA: 0x00018144 File Offset: 0x00016344
        public bool CreateAllControllers(bool autoBind = true)
        {
            bool result = true;

            this.CtrlList.Clear();
            foreach (ControllerDesc controllerDesc in this.CtrlDescList)
            {
                PrefabControllerBase prefabControllerBase = PrefabControllerBase.AddControllerToGameObject(base.gameObject, controllerDesc.m_attachPath, controllerDesc.m_ctrlTypeDNName, controllerDesc.m_ctrlName, controllerDesc.m_luaModuleName, false);
                if (prefabControllerBase == null)
                {
                    global::Debug.LogError(string.Format("PrefabControllerCreater.CreateAllControllers AddControllerToGameObject fail {0} {1} {2}", controllerDesc.m_ctrlName, controllerDesc.m_attachPath, controllerDesc.m_ctrlTypeDNName));
                }
                this.CtrlList.Add(prefabControllerBase);
            }
            if (autoBind)
            {
                foreach (PrefabControllerBase prefabControllerBase2 in this.CtrlList)
                {
                    if (prefabControllerBase2 != null)
                    {
                        prefabControllerBase2.BindFields();
                    }
                    else
                    {
                        result = false;
                    }
                }
            }
            return(result);
        }