public static T GetSubAsset(UnityEngine.Object allAssets) where T : classįor (int i=0 i(UnityEngine. It's a professional tool, but if you're doing it as a hobbyist, non-profit you can download the Personal edition for free. To extract the sprite from the returned array use a helper function, e.g. Unity Asset Bundle Extractor (UABE) 32bit or 64bit Unity Studio GitHub or Executable (Optional) Unity 4 Editor: Shadowrun Returns and the sequels were made with Unity. LoadAssetWithSubAssets just loads the single asset you've requested (and any embedded sub assets). Note, to be clear AssetBundle.LoadAllAssets() is different and probably not what you want, that loads all assets in the bundle into memory. Sprites are considered sub assets of the main asset (png, jpg etc), Unity encodes the details in the meta file - it does this for all assets that arrive in native format. Same applies when using Resources - the method there is called LoadAllAssetsAtPath. Waking this up with an actual answer (and Ignoring the slightly patronising one above.) I had the same issue, the solution is to use LoadAssetWithSubAssets or the async version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |