Mesh Library Reverts Material at Runtime

Hi! I've just started a new, simple project but I'm hitting my head against the wall here.

I'm using a Gridmap object to fill in my 2.5d platformer level. I started by using the default CubeMeshes, and have now moved on to using custom objects exported from Blender. However, the materials settings applied to these meshes don't seem to get used during the game preview. Adding materials to the object has no bearing on how it looks in the game preview, even if it looks perfect in the editor window.

I am using a somewhat older version, so please let me know if this has since been fixed.


  • cyberealitycybereality Posts: 1,659Moderator

    It might have to do with how you are editing the model. I believe when you import, you want to double-click and do new inherited scene. Then save the scene with some other name. After this you may have to delete the original version from the tree (you can leave it in the assets, just not on the screen) and then drag your new inherited scene into the level.

    Depending on how you import the model, you may, instead, need to choose open anyway, then save the scene as something else and do the rest of the steps above. That may or may not be your issue, but it has confused me before so that might be it.

  • TwistedTwiglegTwistedTwigleg Posts: 4,593Admin

    Are you applying the materials to the mesh themselves, or the MeshInstance nodes? The MeshLibrary resource only uses the material applied to the Mesh itself, not whatever materials are applied to the MeshInstance. It took me awhile to figure this out initially, as everything was missing materials when I exported.
    Once the material is applied directly to the Mesh, it should work as expected :smile:

  • Occams_RazerOccams_Razer Posts: 2Member

    Ah, okay. I see. You import the raw .obj, make your changes, then save as a .tres and use that.

    Alright, seems to be working now. Thanks!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file