Below is the code
Public class DestroyByContect: MonoBehaviour {
Public GameObject AstExp;
Void OnTriggerEnter (starts other)
{
If (other) gameObject) tag=="Limit1" | |. Other gameObject. Tag=="Limit2")
{
return;
}
Destroy (other. GameObject);
Destroy (gameObject);
Instantiate (AstExp, transform the position, the transform. The rotation);
}
}
CodePudding user response:
What mistakes?CodePudding user response:

CodePudding user response:
Why did you find on the original poster, please