Class Sprite_Renderer
- Namespace
- AO
- Assembly
- CoreAssembly.dll
Component that renders a sprite. See Assets.Texture to load a texture.
public class Sprite_Renderer : Component
- Inheritance
-
Sprite_Renderer
- Inherited Members
- Extension Methods
Properties
DepthOffset
public float DepthOffset { get; set; }
Property Value
Layer
public int Layer { get; set; }
Property Value
MaskInShadow
public bool MaskInShadow { get; set; }
Property Value
Sprite
The sprite to render
public Texture Sprite { get; set; }
Property Value
TargetViewport
public Viewport TargetViewport { get; set; }
Property Value
Texture
public Texture Texture { get; set; }
Property Value
Tint
The tint of the sprite
public Vector4 Tint { get; set; }
Property Value
WaitForLoad
public bool WaitForLoad { get; set; }
Property Value
Methods
GetMaterial()
Gets the material for this sprite renderer.
public Material GetMaterial()
Returns
GetWorldSize()
The world size of the sprite
public Vector2 GetWorldSize()
Returns
SetMaterial(Material, bool)
Sets the material with which the sprite renderer will be drawn. If transferOwnership is true, then the sprite renderer will destroy the material in its OnDestroy. If transferOwnership is false, then the destruction of the material is not the sprite renderer's responsibility.
public void SetMaterial(Material material, bool transferOwnership)