コード例 #1
0
    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;
    }
コード例 #2
0
ファイル: TestLoadObj.cs プロジェクト: whisperlin/TA2019
    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);
        }
    }
コード例 #3
0
    CharactorLoadHandle LChatacterRecourceInterface.loadResource(string name, string path, AddCoroutineFun fun)
    {
        var handle = LAssetBundleManager.Instance().loadAsset(path);

        return(handle);
    }