C# 클래스 UnityEngine.ProBuilder.ProBuilderMesh

상속: MonoBehaviour
파일 보기 프로젝트 열기: Mertiq/Unity-Learning 1 사용 예제들

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