AnimancerPreviewObject Class

Summary

[Editor-Only] Manages the selection and instantiation of models for previewing animations.
Assembly
Animancer.dll
Namespace
Animancer.Editor.Previews
Interfaces
  • IDisposable
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IDisposable"] Type["AnimancerPreviewObject"] class Type type-node

Syntax

[Serializable]
public class AnimancerPreviewObject : IDisposable

Attributes

Type Description
SerializableAttribute

Properties

Name Value Summary
EventHandler AnimancerPreviewObject.IEventHandler
An optional listener for this object's events.
Graph AnimancerGraph
The Animancer.AnimancerGraph being used for the preview.
InstanceAnimators Animator[]
The UnityEngine.Animators on the Animancer.Editor.Previews.AnimancerPreviewObject.InstanceObject and its children.
InstanceBounds Bounds
The bounds of the Animancer.Editor.Previews.AnimancerPreviewObject.InstanceObject.
InstanceObject Transform
The preview copy of the Animancer.Editor.Previews.AnimancerPreviewObject.OriginalObject.
InstanceRoot Transform
The object to instantiate the Animancer.Editor.Previews.AnimancerPreviewObject.InstanceObject under.
OriginalObject Transform
[UnityEngine.SerializeField] The original model which was instantiated to create the Animancer.Editor.Previews.AnimancerPreviewObject.InstanceObject.
SelectedInstanceAnimator Animator
The UnityEngine.Animator component currently being used for the preview.
SelectedInstanceType AnimationType
The type of the Animancer.Editor.Previews.AnimancerPreviewObject.SelectedInstanceAnimator.

Methods

Name Value Summary
CreateEmpty(string) GameObject
Creates an object using UnityEngine.HideFlags.HideAndDontSave without UnityEngine.HideFlags.NotEditable.
static
DestroyInstanceObject() void
Destroys the Animancer.Editor.Previews.AnimancerPreviewObject.InstanceObject.
Dispose() void
Cleans up this preview.
Initialize(AnimancerPreviewObject, AnimancerPreviewObject.IEventHandler, Transform) AnimancerPreviewObject
Creates a new Animancer.Editor.Previews.AnimancerPreviewObject and calls Animancer.Editor.Previews.AnimancerPreviewObject.Initialize(UnityEngine.Transform).
static
Initialize(Transform) void
Sets the Animancer.Editor.Previews.AnimancerPreviewObject.InstanceRoot for this preview to work under.
SetSelectedAnimator(int) void
Sets the Animancer.Editor.Previews.AnimancerPreviewObject.SelectedInstanceAnimator.
TrySelectBestModel(Object) void
Calls Animancer.Editor.Previews.TransitionPreviewSettings.TrySelectBestModel(System.Object,UnityEngine.Transform) if there is no Animancer.Editor.Previews.AnimancerPreviewObject.OriginalObject yet.