Skip to content

Game.Prefabs.IconAnimationInfo

Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs

Type: class

Base: System.Object

Summary:
Serializable data container that describes per-icon animation parameters used by the notification / UI icon system. Holds the animation type, duration and three Unity AnimationCurves that drive scale, alpha (opacity) and vertical screen position over the animation lifetime. This type is intended to be stored in prefabs or other serialized assets and consumed by the UI/notification playback code.


Fields

  • public Game.Notifications.AnimationType m_Type
    Animation type identifier (enum) that categorizes which animation preset or behavior to use. The enum is defined in Game.Notifications and typically indicates the logical animation role (for example entrance, exit, or other named animation states). Used by systems that pick or branch behavior based on animation type.

  • public float m_Duration
    Total duration of the animation in seconds. Animation curves are evaluated over the normalized 0..1 timeline mapped to this duration when the animation is played.

  • public AnimationCurve m_Scale
    Unity AnimationCurve that controls the scale multiplier of the icon over the animation timeline. Curve keys are evaluated from time 0 (start) to 1 (end) and multiplied or interpreted by the playback code to scale the displayed icon.

  • public AnimationCurve m_Alpha
    Unity AnimationCurve that controls the icon's opacity (alpha) over the animation timeline. Values are expected to be in the typical 0..1 range but are interpreted by the renderer/notification player.

  • public AnimationCurve m_ScreenY
    Unity AnimationCurve that controls the icon's vertical (Y) offset in screen space during the animation. This curve typically defines pixel or normalized offset over the 0..1 timeline; consumers of the data decide how the curve values map to actual screen coordinates.

Properties

  • This class exposes public serializable fields rather than properties. There are no properties defined on IconAnimationInfo; it is a plain data container used for serialization and editing in the Unity inspector.

Constructors

  • public IconAnimationInfo()
    Default parameterless constructor (generated by the runtime). Instances are typically created by Unity's serializer when loading prefabs or can be constructed in code and populated with desired curves and values.

Methods

  • This type does not define any methods. It is a simple serializable DTO (data transfer object) meant to hold animation configuration data.

Usage Example

// Create and configure an icon animation programmatically
var animInfo = new Game.Prefabs.IconAnimationInfo
{
    m_Type = Game.Notifications.AnimationType.SomeType, // choose appropriate enum value
    m_Duration = 1.2f,
    m_Scale = new AnimationCurve(
        new Keyframe(0f, 0.0f),
        new Keyframe(0.15f, 1.2f),
        new Keyframe(1f, 1f)
    ),
    m_Alpha = new AnimationCurve(
        new Keyframe(0f, 0f),
        new Keyframe(0.1f, 1f),
        new Keyframe(0.9f, 1f),
        new Keyframe(1f, 0f)
    ),
    m_ScreenY = new AnimationCurve(
        new Keyframe(0f, -20f),
        new Keyframe(1f, 0f)
    )
};

// The system that renders notifications would read animInfo and
// evaluate the curves over time (0..1) multiplied by m_Duration.