Identifier for FindGameObjectsWithTag?
I'm trying to make an array of certain tagged objects. public GameObject wrongButtons; public void WrongAnswerName () { wrongButtons[] = GameObject.FindGameObjectsWithTag("Wrong Answer"); } It gives me...
View ArticleFind closest object with a certain tag
Im trying to find the closest object from a gameobject to another gameobject with the tag "Blocks". How would I do this?
View ArticleTag an gameobject at runtime after a condition completed
Hi, I want to change tag of an gameobject at runtime after a condition completed. I use: gameObject.tag = "Myothertag"; but it doesnt work How I can do fix it? Thanks, In this example, my condition...
View ArticleHow do I pickup multiples of the same item with the same tag?
Hello, I'm very new to C#. I know the answer to this question may be obvious for most, but I'm stuck at the moment. I wrote a "PlayerHealth/Damage Script". So far, it just has one type of damage, and 4...
View ArticlenullReferenceException when comparing tag in a search for a specific parent....
below is my function i wrote to find a parent with a specific tag. its resulting in a nullReferenceException. here are the specifics of the the gameobjects and their tags. I will start with the child....
View ArticleWhy wont my raycast compareTag properly?
I have a ray that shoots out, if it hits anything it spits out a public string of the gameobject it hits and the distance to it. But to refine it, I created a Tag named "Target", tag my game object I...
View ArticleDocumenting objects/tags/code: best practice?
Hi folks, Im wondering how to best document code, tags, objects and the like - inside Unity3d. With all the dependencies and number of objects when developing a game it´s likely to become challenging...
View ArticleIs this a bug? I can't seem to fix it!
I was working in my project and I was trying to tag a GameObject when I found out that the editor for the GameObject isn't in its default state. Is this a bug? Or is there a way to return this to its...
View ArticleScreen clear using tags
I am trying to create a screen clear for my enemies but for the ones in the camera's view. The main issue is that all the solutions give me a half way result. My button Code void ScreenClear() {...
View Articlei don't know why tag option is dosen't work
in my project. i use some tags. but my new tag is maybe doesn't work. has some picture ![alt text][1] red square : '1' it sprite tag is 'Key' so, as far as i know if i checked...
View ArticleRaycast isn't working when with tag
If I add "&& Hit.collider.tag" part to my function it wouldn't work, I check if the object desired is properly tagged and it was. void Raycast() { RaycastHit2D Hit = Physics2D.Raycast...
View ArticleHow to make unity recognice tags?
I have tried once and again to make unity understand that the enemy is NOT colliding with the correct object, but, after many changes, the debug.log ("va") is still triggering even when the enemy is...
View Articlecreating enemies
I created 3d model and imported it into unity3d and I added a texture to the body but the skin of my model does not look like human skin so the question is how to make the model skin looks like human's...
View Articlelast collision detection?
I'm trying to create a Pong game with 4 players. I need to make the scores, so if player01 last hit it and then touches one of the walls, player01 will get the point. But i don't know how to make it...
View ArticleInclude tags
How can I include tags in an unitypackage and asset store build? It would have to contain the tagmanager.asset right, but how am I supposed to include this in any of the above?
View ArticleUsage of multiple tags or some other workaround?
I've a projectile that I want to work for two tags "Enemy" and "Player" but after a bit of Google search: it doesn't seem like there is a way to tag them both (unless I'm mistaken?) but in that case,...
View ArticleHow do you change the tag of an Object in runtime?
Please I am desperate, how do I change a tag during runtime: I tried what I knew from Unity 4- I have a tagged Object "Tag1" and have a second tag "Tag2"; Then I use this: void Update() {...
View ArticleProblems with tagging using OnMouseDown()
Hey guys, I have been writing a really successful script and I nearly finished it, but I faced a problem- using UnityEngine; using System.Collections; public class Test : MonoBehaviour { void...
View ArticleHow to Make a Transform Variable Target a Random GameObject?
I have a script where an object needs to target a random GameObject, it then immediately faces it and starts moving towards it (last bits not important). Does anybody have any ideas of how I can target...
View ArticleWhat is the problem with this script?
I want if I click on my object it to change tags in both ways but only does on one way. I want both Respawn-> Player and the opposite but it can only go one way- if it switches to Player it can't go...
View Article