# Unit Is Allowed For Player

GrammarinUnit is allowed for player inPlayer
FlagsNative | Function

Returns true if a unit is allowed for the specified player. Use “Allow/Disallow Unit For Player” to modify this.

# Arguments

  • int — Player
  • string<gamelink::Unit> — Unit

Returns — bool

native bool TechTreeUnitIsAllowed(
	int player,
	string unitType,
);

Category: Tech Tree / Individual Restrictions

# Examples

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:6026

        lv_instance = UserDataInstance(auto845894D2_userType, auto845894D2_i);
        lv_uT = UserDataGetUnit(libCOMI_gv_cM_Tychus_UserTypeHeroList, lv_instance, "Unit Type", 1);
        if ((TechTreeUnitIsAllowed(lp_p, lv_uT) == true)) {
            auto3D8DE2E4_ae = (TechTreeUnitProducedAbilCmdCount(lv_uT) - 1);
            lv_i = 0;