# Unload Animation for Unit Type

Grammar — Unload animation animation for unit type unitType
FlagsNative | Action

Unloads an animation for a unit. Note: This is a specialized action that generally relates to storymode models. It will remove additional animation sets that have been loaded to the model through triggers.

# Arguments

  • string<gamelink::Unit> — Unit Type
  • string<filepath> — Animation

Returns — void

native void UnitTypeAnimationUnload(
	string inUnitType,
	string animPath,
);

Category: Animation / Advanced

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:6709

        if ((lv_animOld != lv_animNew)) {
            if ((lv_animOld != null)) {
                UnitTypeAnimationUnload(UnitGetType(gf_ActorUnit(lp_actor)), lv_animOld);
                TriggerDebugOutput(1, (StringExternal("Param/Value/D4A752FC") + StringToText(lv_animOld) + StringExternal("Param/Value/75FB0D17") + gf_ActorName(lp_actor)), false);
            }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:6709

        if ((lv_animOld != lv_animNew)) {
            if ((lv_animOld != null)) {
                UnitTypeAnimationUnload(UnitGetType(gf_ActorUnit(lp_actor)), lv_animOld);
                TriggerDebugOutput(1, (StringExternal("Param/Value/D4A752FC") + StringToText(lv_animOld) + StringExternal("Param/Value/75FB0D17") + gf_ActorName(lp_actor)), false);
            }