C# 클래스 tk2dSpriteCollectionData, Malisse

Sprite Collection Data.
상속: MonoBehaviour
파일 보기 프로젝트 열기: Collegiennes/Malisse 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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