New answers tagged gameobject
GUI is actually rendered according to the screen view port and not according to the camera. In other words it is camera independent. You can try having a 3D text view or sprite in order to achieve the desired functionality. There are lot of other options also . Try Unity 5 GUI system or check out the NGUI plugin for unity. If you still want to use the ...
You could try and check if the distance between two objects is increasing or decreasing or you can use an infinite raycast and check the object it hits.
Use the SKPhysicsBody instances as keys to a dictionary of game objects. When you want to process a collision, retrieve the game object associated with the physics body from the dictionary. Not as efficient as the direct link you sought, but more than sufficient for most purposes.
You can Destroy the component. Be careful about which object you destroy, though. If you pass a GameObject to Destroy, you will destroy the entire thing. To destroy the component, you must pass a reference to that component specifically. //example: destroys the MeshRenderer attached to this GameObject var sphereMesh = GetComponent(MeshRenderer); ...
try using GameObject.FindGameObjectsWithTag or GameObject.FindWithTag or by name (or namepath) GameObject.Find bool playerexists = (GameObject.Find("player") != null)
I will try to help you a litlle bit, in the way I can. Correct me If I am wrong. If I got it, then your game is about creating a dungeon, in wich, you can place block's to build it, like floor, ceiling's and such., and not only block's but you have other object's as well, like chest's and spikes. So If I where to create a game like that, first, I would ...
Top 50 recent answers are included