示例#1
0
    /// <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);
    }
示例#2
0
 void Awake()
 {
     instance = this;
     mainPath = AssetMng.GetPathWithoutExtension("effect/", AssetPathType.PersistentDataPath);
 }