Functions and messages for interacting with the 'Spine' 2D bone animation system.
See SpineProperties
for related properties.
See SpineMessages
for messages related to spine component.
Static methods
staticget_go(url:HashOrStringOrUrl, bone_id:HashOrString):Hash
Retrieve the game object corresponding to a spine model skeleton bone.
The returned game object can be used for parenting and transform queries. This function has complexity O(n), where n is the number of bones in the spine model skeleton. Game objects corresponding to a spine model skeleton bone can not be individually deleted.
staticplay(url:HashOrStringOrUrl, animation_id:HashOrString, playback:GoPlayback, blend_duration:Float, ?complete_function:() ‑> Void):Void
Play an animation on a spine model.
staticreset_constant(url:HashOrStringOrUrl, name:HashOrString):Void
Reset a shader constant for a spine model.
The constant must be defined in the material assigned to the spine model. Resetting a constant through this function implies that the value defined in the material will be used.
staticreset_ik_target(url:HashOrStringOrUrl, ik_constraint_id:HashOrString):Void
Reset the IK constraint target position to default of a spinemodel.
Resets any previously set IK target of a spine model, the position will be reset to the original position from the spine scene.
Parameters:
url | the spine model containing the object |
---|---|
ik_constraint_id | id of the corresponding IK constraint object |
staticset_constant(url:HashOrStringOrUrl, name:HashOrString, value:Vector4):Void
Set a shader constant for a spine model.
The constant must be defined in the material assigned to the spine model.
Setting a constant through this function will override the value set for that constant in the material.
The value will be overridden until Spine.reset_constant
is called.
staticset_ik_target(url:HashOrStringOrUrl, ik_constraint_id:HashOrString, target_url:UrlOrString):Void
Set the IK constraint object target position to follow position of a game object.
staticset_ik_target_position(url:HashOrStringOrUrl, ik_constraint_id:HashOrString, position:Vector3):Void
Set the target position of an IK constraint object.
staticset_skin(url:HashOrStringOrUrl, spine_skin:HashOrString, ?spine_slot:HashOrString):Void
Sets the spine skin on a spine model.
Parameters:
url | the spine model for which to set skin |
---|---|
spine_skin | spine skin id |
spine_slot | optional slot id to only change a specific slot |