80 tags for one game?

Hello unity3D.I have a question about tags.Is 100 tags for a game too much?For example my game have 8 characters and each character uses that 10 tags each.If this is too much tags or should i try a different method for find objects?If anyone knows?Can you please tell me?Also what is the maximum tags a game should have?

public var player : Transform;
var enemy : Transform;
var camLerpAmount : float =0;
var cam  : Transform;
var explosion: GameObject; 
public var roarCamera     : Transform;
public var mouth    : Transform;
var GenzuPlanetRoar     : GameObject;
var Teleport : GameObject;
var spawn    : Transform;


function Awake (){

 player = gameObject.GetComponent(Transform);
 
}


function Start() {

        player = GameObject.FindWithTag("Player").transform;
        enemy = GameObject.FindWithTag("Dummy").transform;
        cam = GameObject.FindWithTag("TaiichiCamera").transform;
        roarCamera = GameObject.FindWithTag("RoarCamera").transform;
        mouth = GameObject.FindWithTag("Jaw").transform;
        renderer.enabled = true;
        collider.enabled = true;
        
}



function OnCollisionEnter(collision : Collision){


 
if(collision.gameObject.tag == "Dummy"){ 
collision.transform.gameObject.animation.Play("Hit_Flying");
collision.transform.gameObject.animation["Hit_Flying"].speed =0.00050;
collision.rigidbody.AddForce (Vector3.forward * 2000000);
player.transform.gameObject.animation.Play("Burn_To_Hell_Part_2");
player.transform.gameObject.animation["Burn_To_Hell_Part_2"].speed = .25;
camLerpAmount = Mathf.Clamp01 (camLerpAmount + 0f);
renderer.enabled = false;
collider.enabled = false;

}
yield WaitForSeconds(2.5);{
cam.transform.position = roarCamera.transform.position - roarCamera.transform.forward;
camLerpAmount = Mathf.Clamp01 (camLerpAmount + 5f);
Instantiate(GenzuPlanetRoar,mouth.transform.position,mouth.transform.rotation);	
cam.transform.Rotate(0,360,0);
		
				
					
					
								
}
yield WaitForSeconds(2.5);{
cam.transform.position = roarCamera.transform.position - roarCamera.transform.forward;
camLerpAmount = Mathf.Clamp01 (camLerpAmount + 5f);
Instantiate(Teleport,spawn.transform.position,spawn.transform.rotation);	

		
				
					
					
								
}



 
 
 
 		
 	
 
 



}

There is nothing wrong with having that many tags.

However you should consider the side effects of doing so, there is likely a better approach to your design than using 10 unique tags for each character but its impossible to give any advice on that without any code to reference.

Eventually the process of creating and maintaining them is going to be unwieldy or counterproductive. Afte rall, you’re only using 100 but already asking if it is safe. In terms of performance, tags are actually pretty fast to find objects in the scene and such so it just depends on your situation.

Using a lot of comparisons with tags imho is actually pretty slow, as string comparisons are slow at all. :slight_smile:

I don’t quite know if too many tags are bad, but I I hope this will help you tidy-up your code a bit.

Instead of coding this:

if(collision.gameObject.tag == "Dummy"){ 
 collision.transform.gameObject.animation.Play("Hit_Flying");
 collision.transform.gameObject.animation["Hit_Flying"].speed =0.00050;
 collision.rigidbody.AddForce (Vector3.forward * 2000000);
 player.transform.gameObject.animation.Play("Burn_To_Hell_Part_2");
 player.transform.gameObject.animation["Burn_To_Hell_Part_2"].speed = .25;
 camLerpAmount = Mathf.Clamp01 (camLerpAmount + 0f);
 renderer.enabled = false;
 collider.enabled = false;
 
 }

I’d organize it like this:

if(collision.gameObject.tag == "Dummy"){ 
  collission.die();
   // Then code a public die() method for whatever it is you are tagging as dummy.
}

…then I’d code a public die() method for whatever it is I am tagging as dummy.