Assetbundle invisible

  • Hello. I'm trying to import a basic cube I made in blender using the assetbundle feature. I managed to import and spawn a particle the default one that's included.

    But I cannot for the earth of me to get the cube to show. It does spawn in game but it's invisible. But I'm standing on it. What texture do I have to put on the cube?

  • Also here is the code I'm using to spawn it (I'm using kotlin) ignore the animation thing i was just messing around. I'm just trying to get the cube to even show up for now.

  • I cannot get it to work. Does anybody else have success importing a 3d model prefab with rigidbody and collier and mesh renderer made from blender into unity?

    I cannot get HDRP/Lit or unlit to work. I'm honestly out of options. I haven't tried making my own shader yet though. But isn't that kinda uneccesarry since I just want a single color on a side etc.

    I'm gonna try different things in blender. Maybe baking the textures will help idk will have to try first.

  • Me and james1bow have been talking an he said he also cannot make a custom model in blender even going far as exporting .obj, I also tried making a custom shader and I cannot get a simple cube import to work. Can we get some help red51 ? Are you able to confirm you also are getting the same issue trying to make a basic model in blender? a cube then exporting:


    and trying to load it in game? (Also with rigidbody etc) ? It does show up in the unity editor but when trying to load it via assetbundle it's invisible.

  • I figured it out! I needed to re-assign the texture and material myself using code. I'm not sure if this is intentional behaviour or a bug.



  • Hey, sorry for my late response! Unfortunately I wasn't able to look into this issue yet, but I will definitely take a closer look at this issue over the holidays.


    Asset bundles had always been a pain in the *** unfortunately... sometimes shader variants are stripped while building the bundle (resulting in invisible or wrong-looking elements ingame). Could you maybe send me your asset bundle (if that works in terms of file size)?

  • Sorry for not responding earlier! :/ In fact this is a tricky issue: it's caused by the GPU Resident Drawer that was added some time ago. It seems that the shader that's shipped with the asset bundle is not compatible with it, or more precisely, it's not compatible with DOTS Instancing. That's a bit weird because the HDRP/Lit shader (or any shader created with shader graph) should support it should... maybe adding GPU Resident Drawer support in the HDRP asset might already fix this, I will look into this!


    However, you can also fix this by adding a so called DisallowGPUDrivenRendering component to the prefab. It might work by doing that in the editor (before building the bundle), but alternatively this can also be done retroactively through the Plugin API by calling prefab.addComponent("DisallowGPUDrivenRendering"); :)


    I tried it with both asset bundles and it worked after adding this component through the API. But please let me know if it still does not work!

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!