Düzenle

Aracılığıyla paylaş


Texture2DExtensions.CreateTextureFromRegion Method

Definition

Creates a texture from a defined region.

public:
[System::Runtime::CompilerServices::Extension]
 static UnityEngine::Texture2D ^ CreateTextureFromRegion(UnityEngine::Texture2D ^ texture2D, int x, int y, int width, int height);
public static UnityEngine.Texture2D CreateTextureFromRegion (this UnityEngine.Texture2D texture2D, int x, int y, int width, int height);
static member CreateTextureFromRegion : UnityEngine.Texture2D * int * int * int * int -> UnityEngine.Texture2D
<Extension()>
Public Function CreateTextureFromRegion (texture2D As Texture2D, x As Integer, y As Integer, width As Integer, height As Integer) As Texture2D

Parameters

texture2D
UnityEngine.Texture2D

The Texture2D.

x
Int32

x position of this texture to get the texture from

y
Int32

y position of this texture to get the texture from

width
Int32

width of the region to capture

height
Int32

height of the region to capture

Returns

UnityEngine.Texture2D

Applies to