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.

learn more… | top users | synonyms

1
vote
2answers
171 views

Determine facing direction mecanim 2d movement

I'm using this script to move my character in my 2d world: public float speed; //Movementspeed public Rigidbody2D rbody; Animator anim; void Start () { rbody = GetComponentInChildren<...
0
votes
2answers
153 views

Where should I save game object's attributes (hp, score) in Swift?

Scenario: I have a game with several game objects on screen. Each can have different score and hitpoints. When I use collision detection for cannonball vs. ship (example) I need to know which ship is ...
-1
votes
2answers
2k views

How to enable and disable scripts on a Game Object?

This worked briefly yesterday, I believe I did something to mess this up. All my inputs that I put in are correct; therefor, it must be the code. I want to switch players. While the red cube's script ...
1
vote
1answer
40 views

How do you play more than one animation at a time in unity

I am trying to have 2 animations on one GameObject and i want them to play at the same time. I have been looking all over and messing around with the animator controller but i cant get it working.
1
vote
1answer
76 views

Blender assets management and workflow for Unity project

I'm trying to decide how to manage my 3D assets, and even how I should construct a world for my game. I should maybe explain, my game is basically a single explorable world set in a school. It's ...
1
vote
1answer
349 views

Structure gameobjects and call events

I'm working on a 2D tile based game in which the player interacts with other game objects (chests, AI, Doors, Houses etc...). The entire map will be stored in a file which I can read. When loading the ...
0
votes
1answer
30 views

Unity2D - How to destroy my Instantiate particle system

I'm having trouble trying to destroy my Instantiated particle system, I can only destroy my gameobject using UnityEngine; using System.Collections; public class meteor_destruction : MonoBehaviour { ...
0
votes
1answer
100 views

Collision between UI element and GameObject

When I first started to develop in Unity I followed the Unity Tutorial for the Space Shooter 2D game and used the knowledge from that to create something myself. Looking at it now it may not have been ...
0
votes
1answer
675 views

Game object position issue in unity3d

I have a set of objects placed on the same layer where all the objects are invisible except one. When I drag an object into a selected area, the current dragged object gets destroyed, and the object ...
2
votes
0answers
43 views

How to disable and enable a randomly generated prefab in an endless runner 3d

Hi all I have been experimenting the endless runner game for some time and needed to optimize it. I read some articles about optimizing my game and it says that once you instantiate the prefabs in the ...
0
votes
0answers
43 views

Bad practice to create a GameObject for every BoxCollider2D? (Unity)

I am creating a 2D Platformer and need more complex BoxCollider2Ds to be able to handle the collisions (multiple tags, addable & removable properties, etc.). My current solution: Create a ...
0
votes
0answers
7 views

Button is not showing up

private EditText inputName = null; private CCMenuItemImage nextBtn = null; private void init() { CGSize winSize = CCDirector.sharedDirector().winSize(); final float scaleX = ...
0
votes
0answers
13 views

MeshRenderer.sharedMaterial does not change twice

Hi I was changing material from an object and using this code that's working well: MeshRenderer renderer = tile.GetComponent<MeshRenderer>(); renderer.sharedMaterial = Resources.Load<...
0
votes
0answers
12 views

Adding calls to an Entities update function

So I am trying to add a property to my entity function then in order for it to update I need to call it within the entity's update function so this is how I create the entity var sprite = ...
0
votes
0answers
116 views

Unity 5 2d array for storing game objects and their data

I want to have a 2D array which has a number of rows relating to the number of game objects and 3 columns. I want each row to have the name of the game object and its position and velocity. Is this ...
0
votes
0answers
487 views

Unity3D - Unable to attach script to GameObject prefab at runtime

I've got a script that manages a scene browser within my application where I'm hoping to generate a new button instance for each scene found. I've put together a button that I've made into a prefab ...
0
votes
0answers
60 views

Particle system ONGui()

I have some scripts which uses OnGUI() method and they are attached to my GameMenu object. I need to play a particle system on the scene while the GUI scripts are active. When I do that I cant see the ...
0
votes
0answers
39 views

Resize gameObject when it has extended a restricted area

So here i have an image will provide a better understanding of my problem. So currently i have some white blocks and within the white blocks i have some cyan bordered boxes. So the current problem i ...