/// <summary> /// 初始化 by吴江 /// </summary> /// <returns></returns> public bool Init() { if (initialized == false) { // init internal value from game system settings baseURL = "";//GetFilePath("", 1); //Debug.LogInternal("资源地址: " + baseURL); SceneLoadUtil sceneLoadUtil = this.GetComponent <SceneLoadUtil>(); if (sceneLoadUtil == null) { sceneLoadUtil = this.gameObject.AddComponent <SceneLoadUtil>(); } GameObject effectAssetFinalObj = new GameObject("EffectAssetFinalObjCache"); effectAssetFinalObj.transform.parent = this.transform; effectAssetFinalObj.transform.localPosition = Vector3.zero; EffectLoadUtil effectLoadUtil = this.GetComponent <EffectLoadUtil>(); if (effectLoadUtil == null) { effectLoadUtil = this.gameObject.AddComponent <EffectLoadUtil>(); } effectLoadUtil.finalObjCacheTrans = effectAssetFinalObj.transform; initialized = true; } return(true); }
void Awake() { instance = this; mainPath = AssetMng.GetPathWithoutExtension("effect/", AssetPathType.PersistentDataPath); }