Class TinyAnimationAuthoring
Add a TinyAnimationAuthoring component to a GameObject to play Mecanim clips in Tiny.
Inherited Members
Namespace: Unity.Tiny.Animation
Syntax
[NotKeyable]
[DisallowMultipleComponent]
[RequireComponent(typeof(Animator))]
public class TinyAnimationAuthoring : MonoBehaviour, IAnimationClipSource
Remarks
Add the Mecanim clips you want to use to the animationClips list. They will be converted and available on the Entity resulting from the conversion of the GameObject with this component.
When you add a TinyAnimationAuthoring component to a GameObject, Unity also adds an Animator component. This Animator component supports previewing animations in the Editor. TinyAnimation does not use the component directly and you can safely leave it empty. It doesn't even require a controller. However, if your Animator does have a controller and some clips attached to it, TinyAnimationAuthoring detects them, converts them, and makes them available at runtime.
Fields
animationClips
The list of animations to be converted and made available at runtime.
Declaration
public List<AnimationClip> animationClips
Field Value
Type | Description |
---|---|
List<AnimationClip> |
patchMissingScaleIfNeeded
Forces the addition of runtime Scale components to the TinyAnimation entity during conversion.
Declaration
[Space]
[Tooltip("An entity whose scale is (1, 1, 1) at conversion will not get any scaling components.\nBy setting this value to true, you allow the system to add the missing scaling components if the animation affects the scale of the Entity.")]
public bool patchMissingScaleIfNeeded
Field Value
Type | Description |
---|---|
Boolean |
playAutomatically
Whether to start playing an animation automatically upon instantiation or not.
Declaration
[Tooltip("Should this animation start playing automatically upon creation?")]
public bool playAutomatically
Field Value
Type | Description |
---|---|
Boolean |
Methods
GetAnimationClips(List<AnimationClip>)
Declaration
public void GetAnimationClips(List<AnimationClip> results)
Parameters
Type | Name | Description |
---|---|---|
List<AnimationClip> | results |