NTexture
Namespace:FairyGUI
Source:Assets/Scripts/Core/NTexture.cs (line 23)
public class NTexture
Constructors
NTexture(NTexture, Rect, bool)
public NTexture(NTexture root, Rect region, bool rotated);
| Parameter | Type | Description |
|---|---|---|
root | NTexture | |
region | Rect | |
rotated | bool |
Source:Core/NTexture.cs (line 182)
NTexture(NTexture, Rect, bool, Vector2, Vector2)
public NTexture(NTexture root, Rect region, bool rotated, Vector2 originalSize, Vector2 offset);
| Parameter | Type | Description |
|---|---|---|
root | NTexture | |
region | Rect | |
rotated | bool | |
originalSize | Vector2 | |
offset | Vector2 |
Source:Core/NTexture.cs (line 212)
NTexture(Sprite)
public NTexture(Sprite sprite);
| Parameter | Type | Description |
|---|---|---|
sprite | Sprite |
Source:Core/NTexture.cs (line 223)
NTexture(Texture)
public NTexture(Texture texture);
| Parameter | Type | Description |
|---|---|---|
texture | Texture |
Source:Core/NTexture.cs (line 127)
NTexture(Texture, Rect)
public NTexture(Texture texture, Rect region);
| Parameter | Type | Description |
|---|---|---|
texture | Texture | |
region | Rect |
Source:Core/NTexture.cs (line 163)
NTexture(Texture, Texture, float, float)
public NTexture(Texture texture, Texture alphaTexture, float xScale, float yScale);
| Parameter | Type | Description |
|---|---|---|
texture | Texture | |
alphaTexture | Texture | |
xScale | float | |
yScale | float |
Source:Core/NTexture.cs (line 137)
Events
CustomDestroyMethod
public static event Action<Texture> CustomDestroyMethod;
This event will trigger when a texture is destroying if its destroyMethod is Custom
Source:Core/NTexture.cs (line 28)
onRelease
public event Action<NTexture> onRelease;
This event will trigger when ref count is zero.
Source:Core/NTexture.cs (line 63)
onSizeChanged
public event Action<NTexture> onSizeChanged;
This event will trigger when texture reloaded and size changed.
Source:Core/NTexture.cs (line 58)
Fields
destroyMethod
public DestroyMethod destroyMethod;
Source:Core/NTexture.cs (line 53)
lastActive
public float lastActive;
Source:Core/NTexture.cs (line 48)
refCount
public int refCount;
Source:Core/NTexture.cs (line 43)
rotated
public bool rotated;
Source:Core/NTexture.cs (line 38)
uvRect
public Rect uvRect;
Source:Core/NTexture.cs (line 33)
Methods
AddRef()
public void AddRef();
Source:Core/NTexture.cs (line 512)
Dispose()
public void Dispose();
Source:Core/NTexture.cs (line 543)
DisposeEmpty()
public static void DisposeEmpty();
Source:Core/NTexture.cs (line 104)
GetDrawRect(Rect)
public Rect GetDrawRect(Rect drawRect);
| Parameter | Type | Description |
|---|---|---|
drawRect | Rect |
Source:Core/NTexture.cs (line 275)
GetDrawRect(Rect, FlipType)
public Rect GetDrawRect(Rect drawRect, FlipType flip);
| Parameter | Type | Description |
|---|---|---|
drawRect | Rect | |
flip | FlipType |
Source:Core/NTexture.cs (line 286)
GetMaterialManager(string)
public MaterialManager GetMaterialManager(string shaderName);
| Parameter | Type | Description |
|---|---|---|
shaderName | string |
Source:Core/NTexture.cs (line 373)
GetUV(Vector2[])
public void GetUV(Vector2[] uv);
| Parameter | Type | Description |
|---|---|---|
uv | Vector2[] |
Source:Core/NTexture.cs (line 314)
ReleaseRef()
public void ReleaseRef();
Source:Core/NTexture.cs (line 523)
Reload(Texture, Texture)
public void Reload(Texture nativeTexture, Texture alphaTexture);
| Parameter | Type | Description |
|---|---|---|
nativeTexture | Texture | |
alphaTexture | Texture |
Source:Core/NTexture.cs (line 431)
Unload()
public void Unload();
Source:Core/NTexture.cs (line 399)
Unload(bool)
public void Unload(bool destroyMaterials);
| Parameter | Type | Description |
|---|---|---|
destroyMaterials | bool |
Source:Core/NTexture.cs (line 407)
Properties
Empty
public static NTexture Empty { get; }
Source:Core/NTexture.cs (line 90)
alphaTexture
public Texture alphaTexture { get; }
Source:Core/NTexture.cs (line 365)
disposed
public bool disposed { get; }
Source:Core/NTexture.cs (line 349)
height
public int height { get; }
Source:Core/NTexture.cs (line 247)
nativeTexture
public Texture nativeTexture { get; }
Source:Core/NTexture.cs (line 357)
offset
public Vector2 offset { get; set; }
Source:Core/NTexture.cs (line 255)
originalSize
public Vector2 originalSize { get; set; }
Source:Core/NTexture.cs (line 264)
root
public NTexture root { get; }
Source:Core/NTexture.cs (line 341)
width
public int width { get; }
Source:Core/NTexture.cs (line 239)