How to find and destroy gameobject with same tag one by one
Hi, i would like to ask if anybody knows a code that at first will find objects to their transform by using the gameobjectfindtag(), the idea here is to find and destroy the gameobject taged as enemy...
View ArticleCannot place checkpoints position into Transform array
I am testing a 2D tower defense game in porblem is that I cannot place checkpoint gameobject positions into Waypoints array which is transform array. Drag and drop also not working and is there any...
View ArticleHow to Respawn an gameObject when it touch another gameObject
I need some help on the game, and I can't find any useful script on YouTube or in any Website, I searched as much as I can to get help, my game is a racer game, and there are blocks you should jump on,...
View ArticleOrganised UI List of multiple different Gameobjects by tag
Hi Everyone I currently have a UI system using text mesh pro that tracks the amount of multiple different gameobjects by tag in a scene. However the tracked objects are always displayed in the UI...
View Article2D Rotation to target?
Hey guys, hopefully, you can help me find an answer to what I'm doing wrong. I'm trying to get this turret to automatically reset to new targets and transform its rotation to a new target each time one...
View ArticleIs "GameObject.FindAllGameObjectsWithTag" related to the hierachy?
So I need to do similar things to lots of game objects. I have positioned them in the hierarchy in the order i want them to be found with "GameObject.FindAllGameObjectsWithTag". They just appear to be...
View ArticleTrying to make the enemy fire
Im trying to get my enemy to fire fireballs. I used ontriggerenter and a trigger box collider and it works but i need it to continue firing while the play is in the trigger. But when I sued...
View ArticleScript working in Editor, not working when Build and Run
I have two issues with my script, hoping to get some direction where i'm going wrong. Issue 1) OnTriggerEnter2D() I execute an if statement checking if my collider.name is equal to an item name and if...
View ArticleScript working in Edit, not working in Build and Run,Script Working in...
I have two issues with my script, hoping to get some direction where i'm going wrong. Issue 1) OnTriggerEnter2D() I execute an if statement checking if my collider.name is equal to an item name and if...
View Articlehow to activate countdown on first Gameobject with tag it being shoot
Hi i wanna start a countdown timer when it have hit my first gameobject, but nomatter what i try i cant get it too work my code look like this using System.Collections; using...
View ArticleGameObject is already being activated or deactivated
Hi all, I´m having a little problem with my current development process.. When my player dies, the gameObject is deactivated. So far so good. In my game I have moving platforms with a parenting code...
View ArticleMy Tags are getting changed, when its loaded from Asset Bundle.
I have created an asset bundle from several scenes. After downloading and loading the scenes, the tags for the game objects are either becoming as Undefined or the tags for the game object are getting...
View ArticleOnCollisionEnter doesn't work !
Hello ! I searched on Google but I didn't find my problem's solution. I'm creating a game, I've got a sphere, and that sphere (controlled by a joystick because it's a mobile game) has to move on a road...
View ArticleAnyone experiencing problem with gameObject.tag?
On my "OnTriggerEnter(Collider col)" I am checking col.gameObject.tag == "someTag"; It works well on Android/Editor mode, but not iOS/StandAloneWin. I logged the col.gameObject.tag on screen using...
View ArticleAssigning a GameObject as Player with a button
So I'm setting up a basic character creation screen and there are two models on the screen. I want to set up that when you press the button under the model, it will give it the Player tag and add the...
View Articleusing gameobject.find('key') but i want to make it with a tag
so i i am creating a game where you need to find keys and pick them up. although i will need to assign a tag or make many different scripts for each key carryingBlue = true;...
View ArticleChecking if Player object is out of bounds
Hello, I have written a javascript code for checking the player if they have fell out of bounds. This is a 3D platformer that I am tring to make. I am recieving errors and can not run the game with...
View ArticleHow to GameObject.FindGameObjectsWithTag within children of a specific...
I want to get a collection (List or GameObject[]... whatever I can iterate through) of the children inside a specific GameObject with a Tag assigned to them. But I'm only able to run...
View ArticleHow to check if two objects have same tag?
Hello, I made two objects, with same tag. And I need to check if these two objects have a same tag. How can I get current object's tag? I managed to get second object's tag but not firsts.. Please...
View ArticleProblems with Physics.Raycast
I’m making a small game that mainly just involves picking up and throwing things. To do so, I’m trying to create a Raycast on the player, so that when he gets close enough to something, it’ll show that...
View Article