The '''StaticMesh''' component is used to load a static mesh asset from the Uri specified in `URL`
The '''StaticMesh''' component is used to load a static mesh asset from the Uri specified in `URL`
Generally, you will not need to use this component directly, as it is created automatically when importing a new mesh, or when baking a [[:Category:Components:Assets:Procedural Meshes|Procedural Mesh]]
Generally, you will not need to use this component directly, as it is created automatically when importing a new mesh, or when baking a [[:Category:Components:Assets:Procedural Meshes|Procedural Mesh]] using the Sync Method <code>BakeMesh()</code>
<!--T:2-->
<!--T:2-->
Line 16:
Line 16:
{{Table ComponentFields
{{Table ComponentFields
|URL|Uri| The Uri pointing to the .meshx asset to be loaded
|URL|Uri| The Uri pointing to the .meshx asset to be loaded
|Readable|Bool|
|Readable|Bool| Whether this component's data can be read via protoflux.
}}
}}
Line 25:
Line 25:
|ResaveMesh()|null|Will generate a new asset and URL, without destroying or modifying the previous one.
|ResaveMesh()|null|Will generate a new asset and URL, without destroying or modifying the previous one.
|RecalculateNormals()|null|Will recalculate all of the vertex normals on the mesh.
|RecalculateNormals()|null|Will recalculate all of the vertex normals on the mesh.
|RecalculateNormalsMerged()|null|
|RecalculateNormalsMerged()|null| Recalculates this meshes vertex normals which effects shading.
|RecalculateTangentsMikktspace()|null|
|RecalculateTangentsMikktspace()|null| Recalcates mesh tangents which affect shading. This is Mikkspace which is defined by UnityEngine's definition.
|RecalculateTangentsSimple()|null|
|RecalculateTangentsSimple()|null| Recalulates mesh tangents which affect shading. Simple mode.
|FlipNormals()|null|Flips the vertex normals of the mesh (used to fix issues with shadows being on the lit side of a mesh)
|FlipNormals()|null|Flips the vertex normals of the mesh (used to fix issues with shadows being on the lit side of a mesh)
|ReverseWinding()|null|Reverses the vertex winding order of the mesh (used to fix issues where mesh is "inside out")
|ReverseWinding()|null|Reverses the vertex winding order of the mesh (used to fix issues where mesh is "inside out")
|MakeDualSided()|null|Duplicates all vertices on the mesh, but with an inverted winding, which allows it to be seen from both sides.
|MakeDualSided()|null|Duplicates all vertices on the mesh, but with an inverted winding, which allows it to be seen from both sides.
|ConvertToFlatShading()|null|Duplicates all shared vertices on the mesh, so that the vertex normals for a given face can be perpendicular, resulting in a faceted (or "flat") look.
|ConvertToFlatShading()|null|Duplicates all shared vertices on the mesh, so that the vertex normals for a given face can be perpendicular, resulting in a faceted (or "flat") look.
|ConvertToConvexHull()|null|
|ConvertToConvexHull()|null| creates a Convex Hull Mesh from this mesh. Which a good analogy is wrapping the mesh in plastic wrap for a new shape.
|ConvertToPointCloud()|null|
|ConvertToPointCloud()|null| Creates a mesh that is a cloud of points using the vertices of this mesh.
|MergeDoubles()|null|
|MergeDoubles()|null| Merges all the vertices in the exact same place on the mesh.
|StripEmptyBlendshapes()|null|
|StripEmptyBlendshapes()|null| Strips blendshapes from the mesh that don't move any vertices.
|StripBlendshapeNormals()|null|
|StripBlendshapeNormals()|null| Gets rid of per shapekey normal data
|StripBlendshapeTangents()|null|
|StripBlendshapeTangents()|null| Gets rid of per shapekey tangent data.
|GetBoneList()|null|
|GetBoneList()|null| Gets the names of bone data associated with this mesh.
|GetBoneData()|null|
|GetBoneData()|null| Gets all the data about bones associated with this mesh.
|TrimBoneWeightCount()|null|Trims the number of bones affecting any vertex in the mesh to 1, 2, 3 or 4 Bones.
|TrimBoneWeightCount()|null|Trims the number of bones affecting any vertex in the mesh to 1, 2, 3 or 4 Bones.
|ScaleUVs()|null|Multiplies the texture coordinates of the mesh by the given value.
|ScaleUVs()|null|Multiplies the texture coordinates of the mesh by the given value.
}}
}}
<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
Revision as of 22:59, 10 November 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
The StaticMesh component is used to load a static mesh asset from the Uri specified in `URL`
Generally, you will not need to use this component directly, as it is created automatically when importing a new mesh, or when baking a Procedural Mesh using the Sync Method BakeMesh()