asset_clear_tags

This function clears all tags present on the given asset from The Asset Browser and returns whether any tags were removed.

If the function succeeds in clearing the tags it will return true otherwise it will return false.

You supply either the asset name (as a string) or its asset index, and if you supply an asset index value, then you will need to supply the optional asset type argument (a constant), as assets of different types can have the same index, even though they cannot have the same name. The available asset types are listed in the table below:

Asset Type Constant
ConstantDescription
asset_objectThe given name refers to an object.
asset_spriteThe given name refers to a sprite.
asset_soundThe given name refers to a sound.
asset_roomThe given name refers to a room.
asset_tilesThe given name refers to a tile set.
asset_pathThe given name refers to a path.
asset_scriptThe given name refers to a script.
asset_fontThe given name refers to a font.
asset_timelineThe given name refers to a time line.
asset_shaderThe given name refers to a shader.
asset_animationcurveThe given name refers to an Animation Curve.
asset_sequenceThe given name refers to a Sequence.
asset_particlesystemThe given name refers to a Particle System.
asset_unknownThe given name refers to an asset that either does not exist, or is not one of the above listed.

 

Syntax:

asset_clear_tags(name,[asset_type]);

ArgumentTypeDescription
name_or_indexString or AssetThe name of the asset (a string) or its index value (an integer).
[asset_type]Asset Type ConstantOPTIONAL The type of asset to clear the tags from, only used when supplying an index for the first argument.

 

Returns:

Boolean (whether any tags were removed)

 

Example:

asset_clear_tags(obj_Enemy_Parent, asset_object);

The above code will clear all tags from the given object asset.