private IEnumerator LoadSkillData(CharactorLoadResultData res, string skillId)
    {
        //G:\utils\Tools\SkillEditor\Assets\StreamingAssets\SkillEditor\Data
        string path   = LAssetBundleManager.Instance().GetRootUrl() + "SkillEditor/Data/" + skillId + ".skill";
        var    handle = LAssetBundleManager.Instance().loadAsset(path);

        while (!handle.isFinish)
        {
            yield return(null);
        }
        string txt       = (string)handle.asset;
        var    skillData = JSonHelper.DeserializeSkill(txt);

        skillDatas[skillId] = skillData;
        res.asset           = skillData;
        res.isFinish        = true;
    }
Esempio n. 2
0
    private IEnumerator LoadObj()
    {
        var handle = LAssetBundleManager.Instance().loadAsset(path);

        while (!handle.isFinish)
        {
            yield return(1);
        }
        if (null == handle.asset)
        {
            Debug.LogError(handle.Error);
        }
        else
        {
            GameObject g = GameObject.Instantiate <GameObject>((GameObject)handle.asset);
        }
    }
    CharactorLoadHandle LChatacterRecourceInterface.loadResource(string name, string path, AddCoroutineFun fun)
    {
        var handle = LAssetBundleManager.Instance().loadAsset(path);

        return(handle);
    }