Learn / Documentation / Script Reference / UIAnimationDatabase
Manual

UIAnimationDatabase

class in Doozy.Engine.UI.Animation / Inherits from ScriptableObject

Description

The UIAnimationDatbase is a type of database that contains references to UIAnimationData assets, used by the system to save and load animation presets
Gesture Listener

Public Variables

  • public List AnimationNames – List of all the UIAnimationData animation names that this database contains

  • public List<UIAnimationData> Database – List of references to UIAnimationData assets

  • public string DatabaseName – The database name

  • public AnimationType DataType – The animation type that determines what type of animations this database contains

Public Variables

  • public bool Add(UIAnimation animation, string animationName, bool saveAssets = true) – [Editor Only] Adds a new entry, a UIAnimationData, to the database. Returns TRUE if the operation was successful

  • public UIAnimationData AddDefaultData(bool saveAssets) – [Editor Only] Adds the ‘Default’ preset name to the database if it’s missing. Returns a reference to the UIAnimationData for the ‘Default’ preset

  • public bool Contains(string animationName) – Returns TRUE if the animation name has been found in the database

  • public bool Contains(UIAnimationData data) – Returns TRUE if the UIAnimationData has been found in the database

  • public void CreatePreset(string newPresetName, UIAnimation animation, bool saveAssets = true) – [Editor Only] Creates a new preset with the given preset name and UIAnimation settings

  • public bool Delete(string animationName, bool saveAssets) – [Editor Only] Iterates through the database to look for the animation name. If found, deletes the entry and the asset file and returns TRUE

  • public bool Delete(UIAnimationData data, bool saveAssets) – [Editor Only] Iterates through the database to look for the UIAnimationData. If found, deletes the entry and the asset file and returns TRUE

  • public UIAnimationData Get(string animationName) – Iterates through the database to look for the animation name. If found, returns a reference to the corresponding UIAnimationData, else it returns null

  • public void RefreshDatabase(bool saveAssets) – Refreshes the entire database by removing nulls, renaming the preset file names to their animation names, sorting the database and updating the animation names list

  • public void RemoveNullEntries(bool saveAssets) – [Editor Only] Removes any entries that do not have an UIAnimationData reference

  • public void SetDirty(bool saveAssets) – [Editor Only] Marks target object as dirty. (Only suitable for non-scene objects)

  • public void Sort(bool saveAssets) – Sorts the entire database by animation name

  • public void UndoRecord(string undoMessage) – Records any changes done on the object after this function

  • private void UpdateAnimationNames(bool saveAssets) – Updates the list of animation names found in the database