Property | 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 |
Method | Description | |
---|---|---|
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.
|
|
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 |
public static CreateFromTexture ( |
||
texture | ||
size | tk2dRuntime | |
names | string | |
regions | Rect | |
anchors | Vector2 | |
return | tk2dSpriteCollectionData, |
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 |
return | int |
public string[] spriteCollectionPlatformGUIDs | ||
return | string[] |
public tk2dSpriteDefinition[], spriteDefinitions | ||
return | tk2dSpriteDefinition[], |