Quantcast
Channel: Questions in topic: "assetbundle"
Viewing all 1593 articles
Browse latest View live

Unity5.4 AssetBundle: illegal LocalPathID in persistentmanager

$
0
0
When I upgrade to Unity5.4.1p4, AssetBundle:LoadAsset in Editor crash. illegal LocalPathID in persistentmanager UnityEngine.AssetBundle:LoadAsset_Internal(String, Type) UnityEngine.AssetBundle:LoadAsset(String, Type) (at C:\buildslave\unity\build\artifacts\generated\common\runtime\AssetBundleBindings.gen.cs:204) ... The file 'archive:/CAB-xxx/CAB-xxx' is corrupted! Remove it and launch unity again! [Position out of bounds!] UnityEngine.AssetBundle:LoadAsset_Internal(String, Type) UnityEngine.AssetBundle:LoadAsset(String, Type) (at C:\buildslave\unity\build\artifacts\generated\common\runtime\AssetBundleBindings.gen.cs:204) It's ok on iphone and android device. Their is also no problem in Unity5.3 and older version. What's the problem?,

Is it possible to prevent certain components from being used in AssetBundles?

$
0
0
Is it possible to prevent certain components from being used in AssetBundles either by: 1) Detecting their presence in Prefabs or Scenes in the AssetBundle before they have been instantiated or 2) Somehow otherwise removing the individual components before any of their functions have been called

downloaded texture AssetBundle

$
0
0
I builded my assetbundles but those are only textures. How can those downloaded assetbundles be available to its specified gameobject? Does it automatically LINK to its specified gameobjects? I've tried my question but it seems it is not working or I just dont know how to do it. IEnumerator DownloadAndCache (){ while (!Caching.ready) yield return null; using(WWW www = WWW.LoadFromCacheOrDownload (BundleURL, version)) { yield return www; if (www.error != null) throw new Exception("WWW download had an error:" + www.error); AssetBundle bundle = www.assetBundle; } }

Assets Max Size per scene ?

$
0
0
Hi guys, I have scenes build issues and I think it might be assets size related. What is the maximum size of assets per scene ? I'm working on a 2D game with high resolution spritesheets ...

LoadAssetWithSubAssets by name or matching indexes to names

$
0
0
Hi all, I have an AssetBundle with a spritesheet containing 20 sprites. I have no problem loading the sprites using the following code: AssetBundle bundle = AssetBundle.LoadFromFile("Bundles/upgradeicons"); if (bundle == null) { Debug.Log("Failed to load bundle"); return; } Sprite[] itemSprites = bundle.LoadAssetWithSubAssets("UpgradeIcons"); But I would like to be able to access them by name, as I need to build objects at runtime from json, and would **really** like to use names instead of index, *as a single delete in the sprite editor can messup all the indexes*. If I try to get all the names by: string[] names = bundle.GetAllAssetNames(); I only get the name of the main asset. So the questions are,
- Are there any way to get subasset names from bundle? - Are there any way to load subasset by name from bundle? or match up indexes and names? Would like to end up with dictionary with names and sprites. Any input would be appriciated.
- Henning I can get the name of the sprite, but it's just the name of the main asset and the index.. Not usable :( So could reformulate the question: *How do I force the bundle to save subassets names?*

Compression on the images, in the process of building asset bundles?

$
0
0
Hello, I am doing an app for ipad using models created with a 3d scan program. I have around 17k tris. and near 70 materials in the scene. I builded the assetbundles in 6 parts and the app runs ok, but the problem is that I can not see the textures ok. I explain it: the textures were created directly from the 3d scan program, when I see them in Unity, I see it well when I am close to an object, but, when I move away from that object, I can see the seams of the texture. In my Ipad it is not the same, I see the seams of the textures every time. So does it mean that in the process of building asssetbundles, unity makes some kind of compression on the images?? How could I fix this and see the right texture when I am close to an object? Thank you!!

iOS On Demand Resources failing to load

$
0
0
Hi, I'm trying to implement some basic ODR using AssetBundles on iOS. I'm using the AssetBundleManager examples for iOS ODR as reference: https://forum.unity3d.com/threads/second-preview-build-for-ios-9-on-demand-resources-and-app-slicing-support.353491/ I can use Simulation Mode and everything works great in the Editor. When I built out the Xcode project, I can see that my Resource Tags are properly set. I'm embedding the resources in the build settings for local testing. When I run the game on my device, AssetBundleManger reports this error: Failed downloading bundle iOS from odr://iOS/iOS: unsupported URL Is there something obvious that I'm missing? Is there an extra step I'm forgetting? Any clues would be much appreciated. Thanks.

the size of assetbundle is larger than expected

$
0
0
I am using below code to output an assetbundle. BuildPipeline.BuildAssetBundles("Assets/AB", BuildAssetBundleOptions.None, BuildTarget.Android); When I output one cube, the size of output bundle is about 70k. I think the data of vertex, normals, uvs for a cube should be much less than 70k. Let alone the compression of assetbundle. Then I tried to output 10000 cubes with different positions, the size of output bundle is about 1.6MB. Each cube should share the same mesh, and has respective name, transform(position, scale, rotation). The Increased size should be about 10000 * (10 + 3*4 + 3*4 + 3*4) = 460k. If compressed, should be less. I think I must miss something important. Someone can help me out? Thanks.

Loading dynamically multiple 3d objects from remote server at runtime

$
0
0
Hi, I have a server where I am uploading `.fbx` (or other extensions for 3d models) files. Is it possible from unity application to load those files dynamically (e.g on a button click), without defining an `AssetBundler` for each model? What is the best and efficient way to make REST API calls within application? Thank you in advance!

Create assetBundles for a previous version of unity.

$
0
0
I mod a game (PlanetBase) made with an unity version < 3.5. I want to load my custom models using assetBundles, is it possible to create it with unity 5 and export it for a given version of unity ? Or did I need to use unity 3. In an other way can I make assetBundle for an unity3 project without buy a pro version.

Why is AssetBundle:get_mainAsset thrown when passing an asset bundle as an argument to a function?

$
0
0
Super strange issue, and maybe a bug within Unity. In a C# base applicaiton, when downloading an asset bundle from S3 occasionally, on both mobile devices and within the editor, the following error is thrown AssetBundle client_editor_en_us doesn't have main asset! UnityEngine.AssetBundle:get_mainAsset() DownloadBundleState:OnBundleDl(AssetBundle) (at Assets/Scripts/StateMachine/DownloadBundleState.cs:218) c__Iterator2:MoveNext() (at Assets/Scripts/Managers/AssetBundleDownloadManager.cs:138 Now, the main asset is in fact null/unset but no code is explicitly trying to access the main asset. In fact this bundle is simply passed into a callback function. This callback function is what is actually throwing the error. Here's the download logic: using (UnityWebRequest www = new UnityWebRequest (url)) { // Set up a download handler to pull and asset bundle by version, ignore the check sum DownloadHandlerAssetBundle downloadHandler = new DownloadHandlerAssetBundle (url, cachedVersion, 0); www.downloadHandler = downloadHandler; yield return www.Send (); if (www.error != null) throw new Exception ("WWW download had an error:" + www.error); url = url.Split ('?') [0]; dictAssetBundleRefs.Add ( url + cachedVersion.ToString (), new AssetBundleRef (url, cachedVersion) { assetBundle = downloadHandler.assetBundle } ); callback (downloadHandler.assetBundle); } And here's the callback being invoked: private void OnBundleDl(AssetBundle bundle) { AssessmentContentProvider.Instance.Init (bundle); Blackboard [AssessmentConstants.BLACKBOARD_KEY_DOWNLOADED_CONFIG_VERSION] = 9; StartBundle (); } // DownloadBundleState.cs:218 3 very abnormal things: 1. No code tries to access the main asset. Only the AssessmentContentProvider initialization just assigns the variable to a member. 2. The error is reported at the last line of the function, leading me to believe it actually occurs when the function parameter itself is evaluated or after the function is completed outside the main thread. 3. Despite throwing this unhanded exception the app functions totally fine, the asset bundle is set, and we are able to read assets from it. Because of that I wonder if this a bug within Unity itself, where under certain circumstances it automatically tries to read the main asset. The really crazy, to me, is why normal program execution is totally unaffected by this (relative to where it occurs) critical unhanded exception. Am I missing something very obvious about the user of bundles within parameters or how unity cleans up reference local reference variables to bundle? Only documentation I can find on the main asset says its optional and must be requested specifically.

IOS AssetBundle.Unload

$
0
0
I saw this passage in official tutorial: "This primarily occurs when Unity loses and regains control over its graphics context, such as when a mobile app is suspended or the user locks their PC. In this case, Unity must re-upload textures and shaders to the GPU. If the source AssetBundle for these assets is unavailable, the application will render Objects in the scene with "missing shader" magenta." https://unity3d.com/cn/learn/tutorials/topics/best-practices/assetbundle-usage-patterns?playlist=30089 I tested IOS testing and loading the model in a AssetBundle . AssetBundle.Unload(false); After that I hanged up program and testing 3,5,10,20 minutes later.I enter the game and the model is still rendering normal. untiy: 5.4.2f1 IOS :9.2

How to upload files for use in built game from user's computer?

$
0
0
Hi guys, So I am trying to create a game where users can upload files such as images and text files for use in the game to create materials, color the terrain, etc. The catch is that I am going to assume that they do not have Unity Editor and that all they have is the built game. Is there a way to do this? I am aware of Asset Bundles but that requires going through a server which I don't think would work since they would still need access to a computer that has Unity Editor on it if I understand them right. Any help is appreciated guys, thanks!

Missing shader variants/features in asset bundles

$
0
0
When I put all my shaders into an assetbundle Unity will stop determining which shaderfeatures are being used and not include any of them. ShaderVariantCollection doesn't seem to help at all when it comes to including variants of the shader in assetbundles. It seems it only detects which shaderfeatures I'm using if the materials are in the same asset bundle as the shader itself, so I've managed to hack around it by just creating dummy materials of all the shader variants used in the project and putting them in the assetbundle. It works perfectly but seems hackish and I'm wondering if there's some better/proper way of doing it.

Can i build an Asset Bundles with Unity Free Version?


MipMaps in AssetBundles

$
0
0
Hey everybody, How would you go about including mipmaps in an assetbundle? As far as I can tell, texture settings don't come with textures loaded via assetbundles. If this isn't possible, is there a built in way of loading a high and low res version of each image in the same bundle and actually assigning one to be the mip of the other? Thank you

Creating Asset bundles at runtime

$
0
0
I have a windows application which users can import fbx models into. What I want to do is to be able to create asset bundle from these imported fbx models and then save the bundle file to a server. I wanted to ask if such thing is possible with unity. I have searched for answers but couldn't find any , there were some similar threads but none was exactly addressing this.
I'll appreciate if someone can help me with this.
Thanks

AssetBundle,Multiple machine

$
0
0
there is a big map i want to load with assetbundle because it's too large,so i have to split it and build it with multiple machine to save time then i made a script to load all assetbundle there is a question ,each machine all will export windows file and windows.manifest file so finally,what should i to merge those? my english is not good,hope you can understand me and help me,thx :-)

Loading scenes from assetbundle in Android

$
0
0
Hello, I'm new to this community, I would like to receive some suggestions about my trouble. I'm working on an android application, I would like this application to load a scene from an asset bundle. I built the asset bundle with "Asset Bundle Manager" asset from Asset Store, it's built for android platform. Suddenly when I try to load scene, the scene shows blue or black screen. I did not found anything "goggling", so I wrote this post. Thank you.

Mecanim is not working with assetbundle(IL2CPP build)

$
0
0
Hi. Bro
This is a terrible problem my colleague has been continuing with Mecanim.
Version used (5.3.3, 5.4.3)
**Mecanim loaded with assetbundle on iOS and Android (using IL2CPP) is not working.**
I've seen a lot of related issues, but is there no solution?
Tried the following method but it failed.
1. Manual play (On a function like OnEnable)
2. Manual play (after waiting through Corutine)
Verified through log
1. Rotation component values are all output as 'NaN'
Help!
Viewing all 1593 articles
Browse latest View live