//流程实例化 //根据类名进行实例化 protected virtual void IniProcess(string processName) { //如果流程已经启动了 就跳出 if (CheckProcessIsInied(processName)) { return; } try { //根据名称 实例化对应的流程 Type type = Type.GetType(processName); ProcessBase pb = type.Assembly.CreateInstance(type.Name) as ProcessBase; if (pb != null) { _nowRunProcess = pb; GameObject obj = new GameObject(processName); _nowRunProcess.Initialization(this, obj); } else { Debug.LogError("流程实例化为空: " + processName); } } catch (Exception) { Debug.LogError("对应的流程类实例化失败: " + processName); } }