C# Class UnityEngine.ProBuilder.ProBuilderMesh

Inheritance: MonoBehaviour
Afficher le fichier Open project: Mertiq/Unity-Learning Class Usage Examples

Private Properties

Свойство Type Description
GetUVs ReadOnlyCollection
InvalidateCaches void
InvalidateFaces void
InvalidateSharedTextureLookup void
InvalidateSharedVertexLookup void
SetSharedTextures void
SetSharedVertices void

Méthodes publiques

Méthode Description
GetColors ( ) : Color[]

Get an array of Color values from the mesh.

GetNormals ( ) : Vector3[]
GetTangents ( ) : Vector4[]

Get the tangents applied to the mesh, or create and cache them if not yet initialized.

GetUVs ( int channel, List uvs ) : void

Copy values in a UV channel to uvs.

GetVertices ( IList indexes = null ) : UnityEngine.ProBuilder.Vertex[]

Creates a new array of vertices with values from a @"UnityEngine.ProBuilder.ProBuilderMesh" component.

HasArrays ( MeshArrays channels ) : bool

Check if the mesh contains the requested arrays.

SetUVs ( int channel, List uvs ) : void

Set the mesh UVs per-channel. Channels 0 and 1 are cast to Vector2, where channels 2 and 3 are kept Vector4.

Does not apply to mesh (use Refresh to reflect changes after application).

SetVertices ( IList vertices, bool applyMesh = false ) : void

Set the vertex element arrays on this mesh.

Private Methods

Méthode Description
GetUVs ( int channel ) : ReadOnlyCollection
InvalidateCaches ( ) : void
InvalidateFaces ( ) : void
InvalidateSharedTextureLookup ( ) : void
InvalidateSharedVertexLookup ( ) : void
SetSharedTextures ( IEnumerable indexes ) : void
SetSharedVertices ( IEnumerable indexes ) : void

Set the sharedIndexes array for this mesh with a lookup dictionary.

Method Details

GetColors() public méthode

Get an array of Color values from the mesh.
public GetColors ( ) : Color[]
Résultat Color[]

GetNormals() public méthode

public GetNormals ( ) : Vector3[]
Résultat Vector3[]

GetTangents() public méthode

Get the tangents applied to the mesh, or create and cache them if not yet initialized.
public GetTangents ( ) : Vector4[]
Résultat Vector4[]

GetUVs() public méthode

Copy values in a UV channel to uvs.
public GetUVs ( int channel, List uvs ) : void
channel int The index of the UV channel to fetch values from. The valid range is `{0, 1, 2, 3}`.
uvs List A list that will be cleared and populated with the UVs copied from this mesh.
Résultat void

GetVertices() public méthode

Creates a new array of vertices with values from a @"UnityEngine.ProBuilder.ProBuilderMesh" component.
public GetVertices ( IList indexes = null ) : UnityEngine.ProBuilder.Vertex[]
indexes IList An optional list of indexes pointing to the mesh attribute indexes to include in the returned Vertex array.
Résultat UnityEngine.ProBuilder.Vertex[]

HasArrays() public méthode

Check if the mesh contains the requested arrays.
public HasArrays ( MeshArrays channels ) : bool
channels MeshArrays A flag containing the array types that a ProBuilder mesh stores.
Résultat bool

SetUVs() public méthode

Set the mesh UVs per-channel. Channels 0 and 1 are cast to Vector2, where channels 2 and 3 are kept Vector4.
Does not apply to mesh (use Refresh to reflect changes after application).
public SetUVs ( int channel, List uvs ) : void
channel int The index of the UV channel to fetch values from. The valid range is `{0, 1, 2, 3}`.
uvs List The new UV values.
Résultat void

SetVertices() public méthode

Set the vertex element arrays on this mesh.
public SetVertices ( IList vertices, bool applyMesh = false ) : void
vertices IList The new vertex array.
applyMesh bool An optional parameter that will apply elements to the MeshFilter.sharedMesh. Note that this should only be used when the mesh is in its original state, not optimized (meaning it won't affect triangles which can be modified by Optimize).
Résultat void