Mesh Proxy: name

name
  • Returns the name of the mesh

Return Type:

  • string
    Sample Code

    ############################# get the mesh name

    # import bge
    import bge

    # get the current controller
    cont = bge.logic.getCurrentController()

    # get object that owns this controller
    obj = cont.owner
     
    # Get a list of the meshes on the object
    meshList = obj.meshes

    # Get the first mesh on the object
    mesh = meshList[0]
     
    # get the name of the mesh
    m_Name = mesh.name