Table of Contents

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

float

Layer

public int Layer { get; set; }

Property Value

int

MaskInShadow

public bool MaskInShadow { get; set; }

Property Value

bool

Sprite

The sprite to render

public Texture Sprite { get; set; }

Property Value

Texture

TargetViewport

public Viewport TargetViewport { get; set; }

Property Value

Viewport

Texture

public Texture Texture { get; set; }

Property Value

Texture

Tint

The tint of the sprite

public Vector4 Tint { get; set; }

Property Value

Vector4

WaitForLoad

public bool WaitForLoad { get; set; }

Property Value

bool

Methods

GetMaterial()

Gets the material for this sprite renderer.

public Material GetMaterial()

Returns

Material

GetWorldSize()

The world size of the sprite

public Vector2 GetWorldSize()

Returns

Vector2

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)

Parameters

material Material
transferOwnership bool