Ejemplo n.º 1
0
    public T LoadAsset <T>(string assetName, string assetBundleName = null) where T : Object
    {
        Res loadedRes = resList.Find(loadedAsset => loadedAsset.Name == assetName);

        if (loadedRes != null)
        {
            return(loadedRes.Asset as T);
        }

        loadedRes = ResMgr.GetRes(assetName, assetBundleName);

        resList.Add(loadedRes);

        return(loadedRes.Asset as T);
    }