You are viewing PyUnity docs under the
As such, they are only applicable if you installed from source.
Go to https://docs.pyunity.x10.bz/en/latest/ for the most recent
Module for meshes created at runtime and their various attributes.
- class pyunity.meshes.Mesh¶
Class to create a mesh for rendering with a MeshRenderer
List of lists containing triangles joining up the vertices. Each int is the index of a vertex above. The list is two-dimesional, meaning that each item in the list is a list of three ints.
List of lists containing the texture coordinate of each vertex. The list is two-dimesional, meaning that each item in the list is a list of two floats.
When any of the mesh attributes are updated while a scene is running, you must use
compile(force=True)to update the mesh so that it is displayed correctly.
>>> mesh = Mesh.cube(2) >>> mesh.vertices = Vector3(2, 0, 0) >>> mesh.compile(force=True)
- static quad(size)¶
Creates a quadrilateral mesh.
- static doubleQuad(size)¶
Creates a two-sided quadrilateral mesh.
- static cylinder(radius, height, detail=32)¶
- static sphere(size, detail=16)¶
- static capsule(radius, height, detail=16)¶
- class pyunity.meshes.Material¶
Class to hold data on a material.
- class pyunity.meshes.RGB¶
A class to represent an RGB color.
- static fromHSV(h, s, v)¶
- class pyunity.meshes.HSV¶
A class to represent a HSV color.
- static fromRGB(r, g, b)¶
- class pyunity.meshes.MeshRenderer¶
Component to render a mesh at the position of a transform.
- mat = <pyunity.meshes.Material object at 0x7fc4aa68eb50>¶
Material to use for the mesh
Render the mesh that the MeshRenderer has.