Пример #1
0
    public IEnumerator GetContainedAssetBundleName()
    {
        var assetName = "Assets/AutoyaTests/RuntimeData/AssetBundles/MainResources/textureName.png";
        var done      = false;

        yield return(loader.LoadAsset(
                         assetName,
                         (string loadedAssetName, Texture2D tex) =>
        {
            done = true;
        },
                         (loadedAssetName, failEnum, reason, status) =>
        {
        }
                         ));

        yield return(WaitUntil(() => done, () => { throw new TimeoutException("failed to load asset in time."); }));

        var containedAssetBundleName = loader.GetContainedAssetBundleName(assetName);

        True(containedAssetBundleName == "texturename", "not match. actual:" + containedAssetBundleName);
    }