# Load Unit Model

Grammar — Load model for u
FlagsNative | Action

Loads a unit model.

# Arguments

  • unit — Unit

Returns — void

native void UnitLoadModel(unit inUnit);

Category: Unit / Basic

# Examples

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

    // Implementation
    PreloadObject(c_gameCatalogUnit, (UnitGetType(lp_unit)), false);
    UnitLoadModel(lp_unit);
}

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

    // Implementation
    PreloadObject(c_gameCatalogUnit, (UnitGetType(lp_unit)), false);
    UnitLoadModel(lp_unit);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstorychar.sc2map/MapScript.galaxy:803


    lib281DEC45_gf_ChangeRoom(lib281DEC45_ge_Rooms_StoryRoomVoid);
    UnitLoadModel(UnitFromId(53));
    libNtve_gf_SendActorMessageToUnit(UnitFromId(53), "AliasAdd ZScenePlanet");
    libNtve_gf_SendActorMessageToUnit(UnitFromId(53), "ExternalFinderAdd");

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2map/MapScript.galaxy:805


    lib281DEC45_gf_ChangeRoom(lib281DEC45_ge_Rooms_StoryRoomVoid);
    UnitLoadModel(UnitFromId(36));
    libNtve_gf_SendActorMessageToUnit(UnitFromId(36), "AliasAdd ZScenePlanet");
    libNtve_gf_SendActorMessageToUnit(UnitFromId(36), "ExternalFinderAdd");

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstorychar.sc2mapMapScript.galaxy:803


    lib281DEC45_gf_ChangeRoom(lib281DEC45_ge_Rooms_StoryRoomVoid);
    UnitLoadModel(UnitFromId(53));
    libNtve_gf_SendActorMessageToUnit(UnitFromId(53), "AliasAdd ZScenePlanet");
    libNtve_gf_SendActorMessageToUnit(UnitFromId(53), "ExternalFinderAdd");

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zstoryexpedition.sc2mapMapScript.galaxy:805


    lib281DEC45_gf_ChangeRoom(lib281DEC45_ge_Rooms_StoryRoomVoid);
    UnitLoadModel(UnitFromId(36));
    libNtve_gf_SendActorMessageToUnit(UnitFromId(36), "AliasAdd ZScenePlanet");
    libNtve_gf_SendActorMessageToUnit(UnitFromId(36), "ExternalFinderAdd");

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:312

        for ( ; auto37E86738_u <= UnitGroupCount(auto37E86738_g, c_unitCountAll) ; auto37E86738_u += BoolToInt(lv_indexUnit == UnitGroupUnit(auto37E86738_g, auto37E86738_u)) ) {
            lv_indexUnit = UnitGroupUnit(auto37E86738_g, auto37E86738_u);
            UnitLoadModel(lv_indexUnit);
        }
    }

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:2111

        for ( ; auto4D646238_u <= UnitGroupCount(auto4D646238_g, c_unitCountAll) ; auto4D646238_u += BoolToInt(lv_indexUnit == UnitGroupUnit(auto4D646238_g, auto4D646238_u)) ) {
            lv_indexUnit = UnitGroupUnit(auto4D646238_g, auto4D646238_u);
            UnitLoadModel(lv_indexUnit);
        }
        UISetWorldVisible(PlayerGroupAll(), true);

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:2696

        if ((lv_indexUnit != lib281DEC45_gf_CharacterUnit("Evolution Master")) && (lv_indexUnit != lib281DEC45_gf_CharacterUnit("Kerrigan"))) {
            if ((lp_loadUnload == true)) {
                UnitLoadModel(lv_indexUnit);
                libNtve_gf_SendActorMessageToUnit(lv_indexUnit, "AnimCancelActiveBlends Default");
            }

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:3325

    }
    else if (auto0D8868E4_val == lib281DEC45_ge_Rooms_StoryRoomEggRoom) {
        UnitLoadModel(lib281DEC45_gf_CharacterUnit("Evolution Master"));
        lib281DEC45_gf_ZSS_ApplyAliases();
        SoundSetReverb("Reverb_EggRoom", 1.0, true, true);

campaigns/swarmstoryutil.sc2modbase.sc2data/Lib281DEC45.galaxy:3405

    }
    else if (auto2C44F216_val == lib281DEC45_ge_Rooms_StoryRoomEggRoom) {
        UnitLoadModel(lib281DEC45_gf_CharacterUnit("Evolution Master"));
    }
    else {

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:1754

        UnitGroupAdd(libVCST_gv_pS_RoomUnits[(lp_room)], lp_unit);
        if ((libVCST_gf_CurrentRoom() == lp_room)) {
            UnitLoadModel(lp_unit);
            libVCST_gf_PS_ApplyAliases();
            libVCST_gf_PS_ApplyAllFidgets();

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignStoryLib.galaxy:2252

        if (lv_indexUnit == null) { break; }
        if ((UnitGroupHasUnit(libVCST_gv_pS_RoomUnits[(libVCST_gv_pS_LastRoom)], lv_indexUnit) == false)) {
            UnitLoadModel(lv_indexUnit);
        }

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:1566

        UnitGroupAdd(libNCST_gv_nS_RoomUnits[(lp_room)], lp_unit);
        if ((libNCST_gf_CurrentRoom() == lp_room)) {
            UnitLoadModel(lp_unit);
            libNCST_gf_NS_ApplyAliases();
            libNCST_gf_NS_ApplyAllFidgets();

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCST.galaxy:1936

        lv_indexUnit = UnitGroupUnit(auto8F428406_g, auto8F428406_u);
        if ((UnitGroupHasUnit(libNCST_gv_nS_RoomUnits[(libNCST_gv_nS_LastRoom)], lv_indexUnit) == false)) {
            UnitLoadModel(lv_indexUnit);
        }