C# Класс tk2dSpriteCollectionData, Malisse

Sprite Collection Data.
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Описание методов

CreateFromTexture() публичный статический Метод

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
Результат tk2dSpriteCollectionData,

GetSpriteIdByName() публичный Метод

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
Результат int

Init() публичный Метод

public Init ( ) : void
Результат void

InitDictionary() публичный Метод

Initializes the lookup dictionary
public InitDictionary ( ) : void
Результат void

InitMaterialIds() публичный Метод

Internal function to make sure all material Ids are valid. Used in the tilemap editor
public InitMaterialIds ( ) : void
Результат void

OnDestroy() публичный Метод

public OnDestroy ( ) : void
Результат void

ResetPlatformData() публичный Метод

public ResetPlatformData ( ) : void
Результат void

Описание свойств

allowMultipleAtlases публичное свойство

Specifies if sprites span multiple atlases.
public bool allowMultipleAtlases
Результат bool

assetName публичное свойство

Asset Name, used to load the asset
public string assetName
Результат string

buildKey публичное свойство

public int buildKey
Результат int

dataGuid публичное свойство

GUID of this object, used with tk2dIndex
public string dataGuid
Результат string

halfTargetHeight публичное свойство

Target height used to generate the sprite collection.
public float halfTargetHeight
Результат float

hasPlatformData публичное свойство

When true, spriteCollectionPlatforms & PlatformGUIDs are expected to have sensible data.
public bool hasPlatformData
Результат bool

invOrthoSize публичное свойство

The size of the inv ortho size used to generate the sprite collection.
public float invOrthoSize
Результат float

managedSpriteCollection публичное свойство

When true, sprite collection will not be directly selectable
public bool managedSpriteCollection
Результат bool

material публичное свойство

Only exists for backwards compatibility. Do not use or rely on this.
public Material material
Результат Material

materialIdsValid публичное свойство

public bool materialIdsValid
Результат bool

materials публичное свойство

An array of all materials used by this sprite collection.
public Material[] materials
Результат Material[]

needMaterialInstance публичное свойство

public bool needMaterialInstance
Результат bool

premultipliedAlpha публичное свойство

Whether premultiplied alpha is enabled on this sprite collection. This affects how tint colors are computed.
public bool premultipliedAlpha
Результат bool

spriteCollectionGUID публичное свойство

The sprite collection GUI.
public string spriteCollectionGUID
Результат string

spriteCollectionName публичное свойство

The name of the sprite collection.
public string spriteCollectionName
Результат string

spriteCollectionPlatformGUIDs публичное свойство

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
Результат string[]

spriteCollectionPlatforms публичное свойство

Returns an array of platform names.
public string[] spriteCollectionPlatforms
Результат string[]

spriteDefinitions публичное свойство

An array of sprite definitions.
public tk2dSpriteDefinition[], spriteDefinitions
Результат tk2dSpriteDefinition[],

textures публичное свойство

An array of all textures used by this sprite collection.
public Texture[] textures
Результат Texture[]

version публичное свойство

public int version
Результат int