C# Class tk2dSpriteCollectionData, Malisse

Sprite Collection Data.
Inheritance: MonoBehaviour
Afficher le fichier Open project: Collegiennes/Malisse Class Usage Examples

Méthodes publiques

Свойство Type Description
allowMultipleAtlases bool
assetName string
buildKey int
dataGuid string
halfTargetHeight float
hasPlatformData bool
invOrthoSize float
managedSpriteCollection bool
material Material
materialIdsValid bool
materials Material[]
needMaterialInstance bool
premultipliedAlpha bool
spriteCollectionGUID string
spriteCollectionName string
spriteCollectionPlatformGUIDs string[]
spriteCollectionPlatforms string[]
spriteDefinitions tk2dSpriteDefinition[],
textures Texture[]
version int

Méthodes publiques

Méthode Description
CreateFromTexture ( Texture2D texture, tk2dRuntime size, string names, Rect regions, Vector2 anchors ) : tk2dSpriteCollectionData,

Create a sprite collection at runtime from a texture and user specified regions. Please ensure that names, regions & anchor arrays have same dimension. Use tk2dBaseSprite.CreateFromTexture if you need to create only one sprite from a texture.

GetSpriteIdByName ( string name ) : int

Resolves a sprite name and returns a unique id for the sprite.

Init ( ) : void
InitDictionary ( ) : void

Initializes the lookup dictionary

InitMaterialIds ( ) : void

Internal function to make sure all material Ids are valid. Used in the tilemap editor

OnDestroy ( ) : void
ResetPlatformData ( ) : void

Method Details

CreateFromTexture() public static méthode

Create a sprite collection at runtime from a texture and user specified regions. Please ensure that names, regions & anchor arrays have same dimension. Use tk2dBaseSprite.CreateFromTexture if you need to create only one sprite from a texture.
public static CreateFromTexture ( Texture2D texture, tk2dRuntime size, string names, Rect regions, Vector2 anchors ) : tk2dSpriteCollectionData,
texture UnityEngine.Texture2D
size tk2dRuntime
names string
regions Rect
anchors Vector2
Résultat tk2dSpriteCollectionData,

GetSpriteIdByName() public méthode

Resolves a sprite name and returns a unique id for the sprite.
public GetSpriteIdByName ( string name ) : int
name string Case sensitive sprite name, as defined in the sprite collection. This is usually the source filename excluding the extension
Résultat int

Init() public méthode

public Init ( ) : void
Résultat void

InitDictionary() public méthode

Initializes the lookup dictionary
public InitDictionary ( ) : void
Résultat void

InitMaterialIds() public méthode

Internal function to make sure all material Ids are valid. Used in the tilemap editor
public InitMaterialIds ( ) : void
Résultat void

OnDestroy() public méthode

public OnDestroy ( ) : void
Résultat void

ResetPlatformData() public méthode

public ResetPlatformData ( ) : void
Résultat void

Property Details

allowMultipleAtlases public_oe property

Specifies if sprites span multiple atlases.
public bool allowMultipleAtlases
Résultat bool

assetName public_oe property

Asset Name, used to load the asset
public string assetName
Résultat string

buildKey public_oe property

public int buildKey
Résultat int

dataGuid public_oe property

GUID of this object, used with tk2dIndex
public string dataGuid
Résultat string

halfTargetHeight public_oe property

Target height used to generate the sprite collection.
public float halfTargetHeight
Résultat float

hasPlatformData public_oe property

When true, spriteCollectionPlatforms & PlatformGUIDs are expected to have sensible data.
public bool hasPlatformData
Résultat bool

invOrthoSize public_oe property

The size of the inv ortho size used to generate the sprite collection.
public float invOrthoSize
Résultat float

managedSpriteCollection public_oe property

When true, sprite collection will not be directly selectable
public bool managedSpriteCollection
Résultat bool

material public_oe property

Only exists for backwards compatibility. Do not use or rely on this.
public Material material
Résultat Material

materialIdsValid public_oe property

public bool materialIdsValid
Résultat bool

materials public_oe property

An array of all materials used by this sprite collection.
public Material[] materials
Résultat Material[]

needMaterialInstance public_oe property

public bool needMaterialInstance
Résultat bool

premultipliedAlpha public_oe property

Whether premultiplied alpha is enabled on this sprite collection. This affects how tint colors are computed.
public bool premultipliedAlpha
Résultat bool

spriteCollectionGUID public_oe property

The sprite collection GUI.
public string spriteCollectionGUID
Résultat string

spriteCollectionName public_oe property

The name of the sprite collection.
public string spriteCollectionName
Résultat string

spriteCollectionPlatformGUIDs public_oe property

Returns an array of GUIDs, each referring to an actual tk2dSpriteCollectionData object This object contains the actual sprite collection for the platform.
public string[] spriteCollectionPlatformGUIDs
Résultat string[]

spriteCollectionPlatforms public_oe property

Returns an array of platform names.
public string[] spriteCollectionPlatforms
Résultat string[]

spriteDefinitions public_oe property

An array of sprite definitions.
public tk2dSpriteDefinition[], spriteDefinitions
Résultat tk2dSpriteDefinition[],

textures public_oe property

An array of all textures used by this sprite collection.
public Texture[] textures
Résultat Texture[]

version public_oe property

public int version
Résultat int