Or any class that inherits from one of those, and so on. ![]() So according to the page for the Material class, that's one of: You need an object that inherits from the Material class. It's not a string, the type signature tells you that. Ok, that's good start, so it's probably an index for which surface of the mesh, which makes sense.Īnd what string or what-have-you do you need for the material? Looking at the docs for the Mesh class we find get_surface_count(). But we know a surface is likely related to a mesh, so maybe it's related to the Mesh resource assigned to the mesh property. Ok, so we need to figure out how to find the surface we want. This material is associated with this MeshInstance3D rather than with mesh. Sets the override material for the specified surface of the Mesh resource. But what's the significance of it? Let's read the what the docs say about the method: material, which expects a value of type Material.surface, which expects a value of the type int.Continue navigating through the Mesh/MeshInstance3D docs to understand what surface indices are. So to me it sounds like you need a surface index from a Mesh and a Material. It is intended as generic, extensible system for use in practically any space mission. ![]()
0 Comments
Leave a Reply. |