프로퍼티 | 타입 | 설명 | |
---|---|---|---|
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 ( |
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 | |
리턴 | 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 |
리턴 | int |
public tk2dSpriteDefinition[], spriteDefinitions | ||
리턴 | tk2dSpriteDefinition[], |