imagination XD

realizing dream

[Unity Editor Tool] Set Tag Recursively

2 Comments

This tool will set all object children tag to parent’s tag. Without this, you would have to set every children tag one by one, with this, you’ll only need to drag one parent object to Object to change and every child object’s tag will be same with parent’s. But remember! The tag you want to change must add to Unity Tags (Unity > Edit > Project Settings > Layers and Tags).

Change Tags Recursively

This can be really useful you know since Unity wont let to change tags recursively.

Save it as javascript and put it on Editor folder… Ah yes, I put it on SKiPPER > Set Tag to launch this tool


class SetTagRecursively extends ScriptableWizard
{
	var objToChange : GameObject;
	var tag : String;
	
	function OnWizardUpdate () {
		//objToChange = Selection.gameObject;
	}
	
	function OnWizardCreate () {
		//for(x in objToChange){
			var x = objToChange.GetComponentsInChildren(Transform);
			for(var z in x) z.tag = tag;
		//}
	}
	
	@MenuItem("SKiPPER/Set Tag")
	static function TagRecursively () {
		ScriptableWizard.DisplayWizard("Change Tags Recursively", SetTagRecursively, "Touch to Henshin...");
	}
}

Advertisements

Author: IMGVERTEX

Started making games since 13 year old. 3D CGI Weeaboo | VFX Otaku | Anime Researcher | Indie Game Dev | VR Chuunibyou

2 thoughts on “[Unity Editor Tool] Set Tag Recursively

  1. ahh useful~ i like it :D especially the character got many bones hierarchy on it

FEED ME

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s