C# Класс UnityEngine.ProBuilder.ProBuilderMesh

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetUVs ReadOnlyCollection
InvalidateCaches void
InvalidateFaces void
InvalidateSharedTextureLookup void
InvalidateSharedVertexLookup void
SetSharedTextures void
SetSharedVertices void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

GetColors() публичный Метод

Get an array of Color values from the mesh.
public GetColors ( ) : Color[]
Результат Color[]

GetNormals() публичный Метод

public GetNormals ( ) : Vector3[]
Результат Vector3[]

GetTangents() публичный Метод

Get the tangents applied to the mesh, or create and cache them if not yet initialized.
public GetTangents ( ) : Vector4[]
Результат Vector4[]

GetUVs() публичный Метод

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.
Результат void

GetVertices() публичный Метод

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.
Результат UnityEngine.ProBuilder.Vertex[]

HasArrays() публичный Метод

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.
Результат bool

SetUVs() публичный Метод

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.
Результат void

SetVertices() публичный Метод

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).
Результат void