# Enable/Disable Experience Gain For Unit

Grammarenable|Enable/Disable behavior experience gain for unit
FlagsNative | Action

Enables or disables experience gain for the specified unit.

# Arguments

Returns — void

native void UnitXPGainEnable(
	unit inUnit,
	string inBehavior,
	bool inEnable,
);

Category: Unit / Attributes And Experience

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/StartingExperienceLib.galaxy:1290

        for ( ; ( (autoA8B89EDC_ai >= 0 && lv_indexPlayer <= autoA8B89EDC_ae) || (autoA8B89EDC_ai < 0 && lv_indexPlayer >= autoA8B89EDC_ae) ) ; lv_indexPlayer += autoA8B89EDC_ai ) {
            if ((libGame_gv_players[lv_indexPlayer].lv_heroUnit != null)) {
                UnitXPGainEnable(libGame_gv_players[lv_indexPlayer].lv_heroUnit, null, true);
            }