Skip to main content

Questions tagged [gameobject]

A game object is any object in a game that the player can see and/or interact with. The player object, power ups, enemies, platforms, walls, weapons (if collision detection is considered) and projectiles are all game objects.

Filter by
Sorted by
Tagged with
1 vote
1 answer
59 views

I'm using a very basic animation to create a transition, which involves deactivating a gameobject on the last keyframe. Goal: The ChangeRound animation is about 1 second long. It enables the UI image ...
Curio's user avatar
  • 261
1 vote
1 answer
95 views

I have a scene with quite a few gameobjects in it and for the first time since using Unity, when I enter/exit play mode (or even close and reopen the scene) it takes about a minute to complete this. ...
FrontEnd's user avatar
  • 1,789
1 vote
2 answers
166 views

I have a top-down character object that is a Container of various parts. This character can have elements that should move along with it (think a health bar, a speech bubble) that should NOT rotate ...
Mara's user avatar
  • 121
1 vote
1 answer
123 views

I'm not sure if there's a setting or wildcard I'm missing, but when I search in the hierarchy panel the results are presented in alphanumerical order with no reference to the hierarchy of the ...
FrontEnd's user avatar
  • 1,789
1 vote
1 answer
104 views

Since Destroy happens after the update cycle, I wonder if you could accidentally (or intentionally) change what gets destroyed since you can still have code execute after calling Destroy. For instance,...
Ben Mora's user avatar
  • 467
3 votes
2 answers
855 views

I am trying to check if a GameObject is clicking another GameObject. I am trying to make a 2D shooter like Duck Hunt so this is important. I have tried ...
okcoder1's user avatar
0 votes
1 answer
64 views

A bit of a newb to Unity & game development. I have built a very basic lunar lander ship and made some RCS thrusters out of cubes and cylinders to attach to the fuselage of the ship. However, ...
Skittles's user avatar
  • 103
0 votes
2 answers
284 views

I was trying to create a debug view for my Water object in my Unity application. The problem is that I generate the water at runtime, which makes it impossible to see what it looks like in the editor ...
Arial Pilisov's user avatar
4 votes
1 answer
653 views

I would like to make modular corridors and some other objects in my level, to make it easier to construct them. Do I separate walls, floor, and ceiling or make a tube module? How to avoid seams ...
V S Vuca's user avatar
0 votes
2 answers
951 views

In the built in Tile Palette tilemap editor, you can choose a GameObject brush to set custom tile GameObjects. How would I be able to set a gameObject onto a tile through a script?. There is no ...
CodeWizard777's user avatar
0 votes
1 answer
149 views

I've been stuck with this nightmare for a while, and it's certainly my perfectionism. What I have is a cannon that fires a shell from an object pool. The order of operations is as follows. The ...
Tyler Parker's user avatar
1 vote
1 answer
645 views

I am new to game development. I am trying to change the player prefab every X seconds. For that, I am destroying the previously spawned prefab and instantiating a new prefab. But I don't know how to ...
Vishu Mudgal's user avatar
1 vote
0 answers
60 views

I'm making a 2d game engine using Java Script and WebGL, both of which I am new to, and was wondering if it was a good idea to use a shader object to initialize the fragment and vertex shader and then ...
Myrkgard's user avatar
0 votes
1 answer
224 views

When my GameObjects have run their course, I would like to scrub them and prepare them to go back into an Object Pool. Each of my main GameObjects has around ~20-30 Object Variables. Part of the ...
kanamekun's user avatar
  • 379
1 vote
0 answers
326 views

I'm looking to implement a cursor object similar to the ones from certain tactics RPGs (think Fire Emblem, FFT, etc.), but I'd like for it to be controlled by either keyboard keys or controller ...
NJJ_002's user avatar
  • 47
3 votes
3 answers
5k views

I'm thinking of something similar to Unity, where GameObjects have their boot state and their runtime state, where you can change the runtime state in the editor during game play. Godot is a ...
Michael Macha's user avatar
2 votes
1 answer
78 views

In my GPS based game, there are certain structures the players can build that store units. For example, airbase structures store aircraft objects. Currently, the way I have this organized is the ...
user204468's user avatar
0 votes
1 answer
793 views

Context Hello, currently creating a clone of "Crossy Road" and what I'm trying to do is to spawn my moving object called "Vehicle" at a random speed and rate of spawn. This is also ...
Zeid Tisnes's user avatar
0 votes
1 answer
103 views

Context Hello, its me again. I have been playing around with "Object Pool" and it is fascinating the amount of CPU performance can save up. However, I have encountered a new "feature&...
Zeid Tisnes's user avatar
0 votes
0 answers
63 views

I have game objects which I'm placing relative to a tilemap using the GameObject brush from the 2D Tilemap Extras package. Unfortunately, I'm not sure what is necessary to acheive the visual look I'm ...
Alexander Trauzzi's user avatar
1 vote
1 answer
852 views

If I call the following on a tilemap: myTilemap.ClearAllTiles(); It clears all tiles placed using the tilemaps built in system. But if I've placed any tiles via ...
Alexander Trauzzi's user avatar
0 votes
1 answer
5k views

INTRODUCTION: In unity, I want to make a dynamic, object use system. Where the main player camera shoots a raycast when left mouse button is clicked and if an object that can be used for example a ...
Object's user avatar
  • 289
2 votes
0 answers
1k views

I'm working on a 3D game, and having issues with the colliders. My Cube Controller has movement input by keyboard, with collider and rigidbody components. Cylinder objects have basic colliders and ...
Sheath9's user avatar
  • 21
1 vote
2 answers
1k views

If I select some GameObject in the Unity, e.g. recently added TextMeshProUGUI inside the ...
Sinatr's user avatar
  • 131
2 votes
0 answers
109 views

There is this property defined in the GameObject class: ...
Sinatr's user avatar
  • 131
0 votes
0 answers
289 views

When im breaking fence GameObject there should pop up scores, so it works fine. But position of pop up scores is too low, im trying to raise it by ...
Silz's user avatar
  • 37
0 votes
0 answers
351 views

I need a script for Unity that allows a gameobject to be scaled using pinch & zoom touch controls. I have found lots of answers for scripts that cause the camera to zoom in/out but I want a ...
Hzata's user avatar
  • 1
0 votes
2 answers
2k views

Hello GameDev Community, I have a problem with this pice of code. If I start the "Game", it crashes right away. Probably is its the list of GameObjects or the foreach loop. I have no idea ...
Paski7's user avatar
  • 103
-1 votes
2 answers
431 views

My parent object components: Rigidbody2D and the script I shared below. Children(Head, Body, Arm, Backpack...): There is only collider. There is no rigidbody2D. (I want the parent object to use the ...
gunza's user avatar
  • 13
0 votes
0 answers
158 views

I'm wondering how I can organize instantiated GameObjects that are spawned in sort of a nested structure. I'm spawning these GameObjects via Containers, a set of ...
Ginger and Lavender's user avatar
0 votes
1 answer
326 views

I'm looking for some help to someone throw me a light on this problem I'm having. We're making a clothing game where you got to grab a "cloth" and a "string" and bringing them to ...
MarC's user avatar
  • 1
1 vote
1 answer
228 views

I am making a card game and I am having issues implementing "effects" and effects that are continuous. How can I get effects to activate at the right times, before and after an attack does ...
pillowism's user avatar
0 votes
1 answer
709 views

I need to be able to disable only a specific component of an object publicly. I got a public component but I cant find any ways on the internet on how to disable and enable that component. Here's the ...
Object's user avatar
  • 289
-1 votes
1 answer
2k views

I have a DontDestroyOnLoad Gameobject and i just can't destroy it I have tried a lot of things. ...
Free-Man's user avatar
2 votes
1 answer
1k views

I am making some sort of factory game (topdown 2D) where I will have machines outputting items on conveyors. I was wondering what was the best approach to manage the items on the conveyors. There are ...
Samuel Fyckes's user avatar
0 votes
0 answers
16 views

im trying to set the game object in script1 to be the game object script2 is on ...
Fieriko's user avatar
0 votes
0 answers
96 views

I have a machine and a I want to check if I can place a conveyor at its connexion point. I do it by checking if the machine is at the expected Input position of the conveyor and if the conveyor is at ...
Samuel Fyckes's user avatar
7 votes
2 answers
2k views

I'm drafting my game and implementing small stuff in it, but hit a roadblock. You see, for my game I would like for different items to behave the same or to share behavior, for instance, some items ...
shackra's user avatar
  • 203
0 votes
0 answers
51 views

I have a very simple little game that consists of a player, zombies, food, and treasure. It's all automated. The player will walk towards a zombie and shoot within a certain distance, which costs ...
BBQSquirrel's user avatar
0 votes
1 answer
165 views

I have a World class that currently only has one instance. It has data and methods that need to be accessed by all other game objects. Right now I'm hardcoding a ...
EnderShadow8's user avatar
1 vote
2 answers
2k views

I don't seem to be able to make a reference to a Button inside a menu prefab. My menu prefab consists of a panel and the panel has 4 buttons. I added ...
Mitulát báti's user avatar
2 votes
2 answers
931 views

Obviously there are a Scene hierarchy, but the problem is that the scene hierarchy was not meant for organizing GameObjects because parent GameObjects affect the transformation of their children. For ...
Jasper Citi's user avatar
3 votes
2 answers
1k views

//.... Gameobject tile; int count = 1f; float posX = 0; float posY = 0; ....// GameObject blueTile = (GameObject)Instantiate(Resources.Load("block_blue")); tile = (GameObject)Instantiate(blueTile, ...
ejbytes's user avatar
  • 131
0 votes
1 answer
107 views

I'm trying to instantiate different prefabs at once. But couldn't figure out how. I tried to use Random.Range method but didn't worked for me. It instantiates only one of the prefabs. I want it to ...
Sarp Alemdar's user avatar
1 vote
1 answer
347 views

So,i'm having a bit of an issue with instantiating my gameobjects into to universe(My Scene object). I can create an empty object from scratch and populate it from there with ease,my problem starts ...
Barış Üçkardeş's user avatar
1 vote
1 answer
2k views

I'm going to try out the community here once more, I haven't had very good look in the past with getting help. I'm iterating through a series of List() and I'm creating a bar graph and a line graph ...
John Connor's user avatar
1 vote
0 answers
294 views

I have created UI text object And then created Text field in behavior class: ...
Dims's user avatar
  • 161
0 votes
0 answers
227 views

I'm creating a third person game, and sometimes I face a strange bug that I cannot figure out. Indeed the player may remain stuck in static scene objects, and cannot escape until an angle large enough ...
Jean-Milost Reymond's user avatar
0 votes
0 answers
62 views

I want to destroy any graphic component on a gameobject , example is image,raw image, sprite , ect .But i don't have the list of all graphic component so i don't know how to loop through it . The ...
i'm ashamed with what i asked's user avatar
0 votes
0 answers
198 views

I made a 2d space shooter game awhile ago and I want to go back into it and overhaul some things. I'll provide a link to the game so anyone can play and get a better understanding of what I'm trying ...
Your Pal Drewdle's user avatar

1
2 3 4 5 6