Does "EditorStaticMeshLibrary.get_number_materials()" work?


I am struggling to get number of materials from static mesh with python.
I found unreal.EditorStaticMeshLibrary — Unreal Python 4.26 (Experimental) documentation
but there is an error : LogPython: Error: AttributeError: type object ‘EditorStaticMeshLibrary’ has no attribute ‘get_number_materials’

have any ways to get number of material slots?

Thank you

Did you include the plugin “Editor Scripting Utilities”?

Yes I did. the other functions work well, like get_number_verts or get_num_uv_channels.

Thanks the reply, Andreas!

I found other solution.

I used “unreal.StaticMesh.get_num_sections()”