コード例 #1
0
    private void LoadMode()
    {
        //LoaderPool.InnerLoad(targetVO.modelUri, SimpleLoadDataType.prefabAssetBundle, onloaded, new object[1] { targetVO });
        string outUrl = targetVO.modelUri;// "http://midea-products.oss-cn-shanghai.aliyuncs.com/8b7df9b0-28f5-4c88-a412-324284ccc923/model.assetbundle";//10.0.21.27/yy/model.assetbundle";

        loader = LoaderPool.OutterLoad(outUrl, SimpleLoadDataType.prefabAssetBundle, onloaded, targetVO, onloadedBforClone);
    }
コード例 #2
0
 public void setTexture(GameObject go, string path, string isLocal)
 {
     if (isLocal == "local")
     {
         LoaderPool.InnerLoad(path, SimpleLoadDataType.texture2D, onLoaded, go);
     }
     else
     {
         LoaderPool.OutterLoad(path, SimpleLoadDataType.texture2D, onLoaded, go);
     }
 }
コード例 #3
0
    private void EnterDesign(MsgFromIOS.InfoFromIOS info)
    {
        GlobalConfig.running = true;
        if (Application.platform != RuntimePlatform.IPhonePlayer)
        {
            info.msg = new List <object>()
            {
                "http://cf-hsm-prod-assets.homestyler.com/i/4abd1bba-6d61-481e-9008-25295599e006/iso.jpg"
            };
        }
        switch (info.enterType)
        {
        case "1":
            undoHelper.CreatNewEnter();
            mainpageMachine.setState(ToTwoDState.Name);
            break;

        case "2":    //进入2D
        case "3":    //进入3D
        case "4":    //进入新建方案2D 预置指定模板
        case "5":    //进入新建方案3D 预置指定模板
            mainPageUIController.dispatchEvent(new LoadEvent(LoadEvent.OpenLoadingPage));
            string id     = info.projectId;
            int    tempId = info.tempId;
            if (string.IsNullOrEmpty(id) == true)
            {
                if (localCache.HasCached(tempId))
                {
                    LoaderPool.CacheLoad(tempId, SimpleLoadDataType.JsonScheme, OnCacheLoaded, info);
                    return;
                }
            }
            else
            {
                if (serverCache.HasCached(id))
                {
                    LoaderPool.CacheLoad(id, SimpleLoadDataType.JsonScheme, OnCacheLoaded, info);
                    return;
                }
            }

            LoaderPool.OutterLoad(info.json, SimpleLoadDataType.Json, onloaded, info);
            break;

        default:
            break;
        }
    }
コード例 #4
0
    public override void Render()
    {
        base.Render();
        //EffectImage;

        string [] strs = itemData.path.Split(new string[] { "--" }, StringSplitOptions.RemoveEmptyEntries);
        if (strs.Length == 2)
        {
            string path = strs[1];

            LoaderPool.OutterLoad(path, SimpleLoadDataType.texture2D, onLoadedSetTexture, null);
            //SetTextureTool.SetTexture(EffectImage, path, "notLocal");
        }
        else
        {
            Debug.Log("itemData.meta strs.Length != 2");
        }
    }
コード例 #5
0
    public void setTexture(RawImage go, string path, string isLocal)
    {
        if (go == null)
        {
            Debug.LogWarning("setTexture RawImage go == null");
            return;
        }
        if (string.IsNullOrEmpty(path))
        {
            Debug.LogWarning("setTexture path == null");
            return;
        }

        if (isLocal == "local")
        {
            LoaderPool.InnerLoad(path, SimpleLoadDataType.texture2D, onLoaded, go);
        }
        else
        {
            LoaderPool.OutterLoad(path, SimpleLoadDataType.texture2D, onLoaded, go);
        }
    }