Sprite Definition. More...
Public Types | |
enum | ColliderType |
Collider type. More... | |
enum | PhysicsEngine |
Physics engine. More... | |
Public Member Functions | |
Bounds | GetBounds () |
Gets the trimmed bounds of the sprite. | |
Bounds | GetUntrimmedBounds () |
Gets untrimmed bounds of the sprite. | |
Public Attributes | |
string | name |
Name. | |
Vector3[] | positions |
Array of positions for sprite geometry. | |
Vector3[] | normals |
Array of normals for sprite geometry, zero length array if they dont exist. | |
Vector4[] | tangents |
Array of tangents for sprite geometry, zero length array if they dont exist. | |
Vector2[] | uvs |
Array of UVs for sprite geometry, will match the position count. | |
int[] | indices = new int[] { 0, 3, 1, 2, 3, 0 } |
Array of indices for sprite geometry. | |
Material | material |
The material used by this sprite. This is generally the same on all sprites in a colletion, but this is not true when multi-atlas spanning is enabled. | |
int | materialId |
The material id used by this sprite. This is an index into the materials array and corresponds to the material flag above. | |
string | sourceTextureGUID |
Source texture GUID - this is used by the inspector to find the source image without adding a unity dependency. | |
bool | extractRegion |
Speficies if this texture is extracted from a larger texture source, for instance an atlas. This is used in the inspector. | |
FlipMode | flipped |
Specifies if this texture is flipped to its side (rotated) in the atlas. | |
bool | complexGeometry = false |
Specifies if this texture has complex geometry. | |
PhysicsEngine | physicsEngine = PhysicsEngine.Physics3D |
Physics engine. | |
ColliderType | colliderType = ColliderType.Unset |
Collider type. | |
tk2dSpriteColliderDefinition[] | customColliders = new tk2dSpriteColliderDefinition[0] |
Advanced custom colliders, set when colliderType == Advanced. | |
Vector3[] | colliderVertices |
v0 and v1 are center and size respectively for box colliders when colliderType is Box. It is an array of vertices, and the geometry defined by indices when colliderType is Mesh. |
Sprite Definition.
Collider type.
Physics engine.
Bounds tk2dSpriteDefinition.GetBounds | ( | ) |
Gets the trimmed bounds of the sprite.
Bounds tk2dSpriteDefinition.GetUntrimmedBounds | ( | ) |
Gets untrimmed bounds of the sprite.
ColliderType tk2dSpriteDefinition.colliderType = ColliderType.Unset |
Collider type.
Vector3 [] tk2dSpriteDefinition.colliderVertices |
v0 and v1 are center and size respectively for box colliders when colliderType is Box. It is an array of vertices, and the geometry defined by indices when colliderType is Mesh.
bool tk2dSpriteDefinition.complexGeometry = false |
Specifies if this texture has complex geometry.
tk2dSpriteColliderDefinition [] tk2dSpriteDefinition.customColliders = new tk2dSpriteColliderDefinition[0] |
Advanced custom colliders, set when colliderType == Advanced.
Speficies if this texture is extracted from a larger texture source, for instance an atlas. This is used in the inspector.
FlipMode tk2dSpriteDefinition.flipped |
Specifies if this texture is flipped to its side (rotated) in the atlas.
int [] tk2dSpriteDefinition.indices = new int[] { 0, 3, 1, 2, 3, 0 } |
Array of indices for sprite geometry.
Material tk2dSpriteDefinition.material |
The material used by this sprite. This is generally the same on all sprites in a colletion, but this is not true when multi-atlas spanning is enabled.
The material id used by this sprite. This is an index into the materials array and corresponds to the material flag above.
string tk2dSpriteDefinition.name |
Name.
Vector3 [] tk2dSpriteDefinition.normals |
Array of normals for sprite geometry, zero length array if they dont exist.
PhysicsEngine tk2dSpriteDefinition.physicsEngine = PhysicsEngine.Physics3D |
Physics engine.
Vector3 [] tk2dSpriteDefinition.positions |
Array of positions for sprite geometry.
Source texture GUID - this is used by the inspector to find the source image without adding a unity dependency.
Vector4 [] tk2dSpriteDefinition.tangents |
Array of tangents for sprite geometry, zero length array if they dont exist.
Vector2 [] tk2dSpriteDefinition.uvs |
Array of UVs for sprite geometry, will match the position count.