// Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2023 Kybernetik //
using UnityEngine;
namespace Animancer
{
/// Interface for components that manage an .
///
/// Despite the name, this interface is not necessarily limited to only s.
///
/// This interface allows Animancer Lite to reference an inside the pre-compiled
/// DLL while allowing that component to remain outside as a regular script. Otherwise everything would need to be
/// in the DLL which would cause Unity to lose all the script references when upgrading from Animancer Lite to Pro.
///
/// Documentation: Component Types
///
/// https://kybernetik.com.au/animancer/api/Animancer/IAnimancerComponent
///
public interface IAnimancerComponent
{
/************************************************************************************************************************/
#pragma warning disable IDE1006 // Naming Styles.
/************************************************************************************************************************/
/// Will this component be updated?
bool enabled { get; }
/// The this component is attached to.
GameObject gameObject { get; }
/************************************************************************************************************************/
#pragma warning restore IDE1006 // Naming Styles.
/************************************************************************************************************************/
/// The component which this script controls.
Animator Animator { get; set; }
/// The internal system which manages the playing animations.
AnimancerPlayable Playable { get; }
/// Has the been initialized?
bool IsPlayableInitialized { get; }
/// Will the object be reset to its original values when disabled?
bool ResetOnDisable { get; }
///
/// Determines when animations are updated and which time source is used. This property is mainly a wrapper
/// around the .
///
AnimatorUpdateMode UpdateMode { get; set; }
/************************************************************************************************************************/
/// Returns the dictionary key to use for the `clip`.
object GetKey(AnimationClip clip);
/************************************************************************************************************************/
#if UNITY_EDITOR
/************************************************************************************************************************/
/// [Editor-Only] The name of the serialized backing field for the property.
string AnimatorFieldName { get; }
/// [Editor-Only]
/// The name of the serialized backing field for the property.
///
string ActionOnDisableFieldName { get; }
/// [Editor-Only] The that was first used when this script initialized.
///
/// This is used to give a warning when changing to or from at
/// runtime since it won't work correctly.
///
AnimatorUpdateMode? InitialUpdateMode { get; }
/************************************************************************************************************************/
#endif
/************************************************************************************************************************/
}
}