Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

learn more… | top users | synonyms (2)

0
votes
0answers
4 views

Raycast will not hit generated box colliders at initialization

In my map class I have an algorithm that is generating and merging box colliders together. These belong to the layer "Ground". After that, in some places on my map I'm generating some new cubes on-...
2
votes
3answers
1k views

Camera.WorldToScreenPoint not working with perspective

transform.position = Camera.main.WorldToScreenPoint( new Vector3( origin.position.x, origin.position.y, origin.position.z ) ); I have this code on a Unity 4.6 UI object. The origin is some transform ...
3
votes
1answer
230 views

Problems with Raycasting Requirements

Im working on a script which kinda works like an Enemy AI. Its kinda like a detection system with requirements that are required to be met. This is a recent question i asked using my code Raycast ...
0
votes
0answers
12 views

Unity With C# Script : Class Data Type Variable Array Issue [on hold]

I got a simple question to ask. Just Check below code and the question is in the end at the result of code. I hope you guys can help me.. file item.cs using UnityEngine; using System.Collections; //...
0
votes
0answers
25 views

How should my creatures see the world?

This may not be the best forum for this question, but I know a lot of you have dabbled in the field of general AI for games so here it is. I'm doing the cliche population evolution of creatures in a ...
0
votes
0answers
4 views

Getting error failed to repackage resource

i have error "failed to repackage resource" when I build my APK. I want to integrate Google Play Services in my Unity app. How can I fix this?
1
vote
1answer
105 views

Can't call GameCenter in my Unity game for iOS

I'm trying to integrate Game Center into my Unity 5 project and facings troubles. It seems that authentification is OK when the game starts on iOS device, a notification appears, but leaderboard ...
1
vote
1answer
24 views

Stuck on walls or sliding on top dilemma

I'm making a 2.5D platformer game. I earlier had problem with my character getting stuck on walls when holding the forward button. I solved this problem by adding a physics material with zero friction ...
8
votes
3answers
27k views

Does Unity let you code in Java?

I am fairly new to Unity3D experience , but I have a very good knowledge of Java and Android development. I am really confused that if Java is at all needed for developing android applications? I read ...
-1
votes
0answers
22 views

limit rotate of C# script in unity3d [on hold]

How can I add the following code limits the rotation ? For example, from y : -80 to 80 would be more spin. script from WeaponSystem: public class AILook: MonoBehaviour { public string[] TargetTag =...
1
vote
3answers
74 views

Calculating the angular momentum of rigidbody in Unity3D

Knowing that angular momentum in 3D is L = Iω (moment of inertia times angular velocity), how do I calculate it in video game world? In unity3d I have the diagonal inertia tensor rigidbody....
1
vote
1answer
38 views

How to follow a car with correct rotation

I am making a game where car will follow a user car. I am moving use car using keyboard keys it is working fine running on my game environment roads smoothly. To follow enemy car i am using nevMesh, ...
-1
votes
1answer
35 views

Moving Platform

(Help me Google Translate) Hello everyone! I made moving platform from this video. Video but I have some trouble and when my hero stand on platform he have some strange vibration. Script ...
1
vote
1answer
91 views

How to get dynamic RigidBody rotation/tilt on uneven platform?

I have a rigid body with PolygonCollider2D which has some complex circular shape and I'm using uneven platform. Im using Following code to move the object forward CharacterRigidBody.velocity = new ...
2
votes
1answer
431 views

Image target display in unity Vuforia

I am using unity 4.5.1f3 and using the Vuforia sdk 5.0.5.I have downloaded the sample project from the Vuforia site.When I tried to run the sample of Imagetarget project,it asked to add license key....
2
votes
1answer
5k views

Sending RPC calls from server to client inside Unity

In my game inside Unity, I have two scenes setup. One for the main server ( acts like authoritative server ) and the other scene for my client. The game starts once my client connects to the server. ...
0
votes
1answer
35 views

UNITY3D How can my capsule rotate with my camera?

I'm new to 3D game development in Unity. I'm using Unity5. I've created a first person character controller that can move using WASD and I've created a crosshair along with a mouselook script. Here's ...
0
votes
0answers
31 views

What is the more efficient way of implementing 3d TD maps

This question is more on the design aspect than coding. I am working on a 3d tower defense game, where essentially each map is built on a 27x37 grid (not using real units), filled with walls(cubes ...
1
vote
2answers
43 views

How to create Half hemisphere 3D model

I already have an hemisphere.obj 3D model. But I'm trying to build a half-hemisphere (quarter sphere) model. How can I do that? What is the easiest way to do that? Generally, is there any easy way to ...
1
vote
2answers
50 views

How can I register Mouse Events in the Scene window of the Editor?

I want to create a custom level editor for the level designers that should allow them to place predefined objects in Unity3d similar to the Terrain wizard. How can I register Mouse Events in the ...
-1
votes
0answers
19 views

How do you understand Unity3d Scripting errors? [on hold]

So there are these things in Unity called "Compiler Errors" which is a message you get if you have an error on a JS or C# script, it would also "Give you an explanation" to what's wrong with it, I ...
4
votes
2answers
2k views

How to mirror flip animation curves in Unity?

I have a animation that moves my camera from left to right. Now I'd like to copy it with 'mirror' transformation so I can use it to move from right to left. Is it possible to do it using script or ...
1
vote
1answer
91 views

Calculating unique ID number from a set of bitmasked tiles

So I write this kind of match3-style game where you as a player need to match tiles with three or more of the same type and I'm thinking what is the best method to recognize the shapes without writing ...
2
votes
1answer
31 views

Unity - resizing particles dont mantain collisions properly

I am trying to make particles for blood on death. This is what I got so far: Which looks fine and all. But now I also wanted to make the blood particles turn smaller over their lifetime, so I ...
3
votes
1answer
34 views

Respawn not working properly upon scene reload. Why is this?

So I made a respawn function and what is supposed to happen is the script it supposed to load a saved checkpoint. However I need to reset the scene (and again this worked just fine last night which ...
1
vote
0answers
29 views

How do you solve where the camera should be on a bezier curve depending on player? (camera on rail)

I am writing a game where I require a camera on rail; That is, the camera's path is fixed and follows a bezier curve. However, I cannot find any resources online for solving the closest point on a ...
1
vote
1answer
101 views

Character stuck on box collider 2.5D

I'm having trouble with my character on a 2.5D platformer. The character get stuck if it collides without reaching the platform's top. Here is a gif showing it: http://i.imgur.com/jmZ6O1K.gifv Both ...
2
votes
1answer
256 views

How can zoom into my object when that object is being clicked?

Suppose that I have the three game(cube,Quard,sphere) object. When I click on a particular game object suppose think I have clicked on the cube,the cube object should get zoomed in on the screen. how ...
1
vote
0answers
18 views

How to manage this problem in a multiplayer client-server game with Photon ?

Good day. I'm developing my first simple game, a racing car, using Unity and Photon. In my game there are a function that generate random Bonus on random position each (for instance) 5 seconds. ...
0
votes
1answer
86 views

Unity equivalent to cocos2D (and Sprite Kit) Actions?

Does Unity have an equivalent to the Actions feature/functionality of cocos2D and Sprite Kit; if so, what is it? cocos2D Actions: http://python.cocos2d.org/doc/programming_guide/actions.html http://...
1
vote
1answer
279 views

Trying to get reference to Button in Javascript Unity3d

I've this simple script in Unity3d: #pragma strict public var topLeft : UnityEngine.UI.Button; public var topCenter : UnityEngine.UI.Button; public var topRight : UnityEngine.UI.Button; public var ...
2
votes
1answer
496 views

Mesh fading to transparent

I have a 2D Mesh object generated at runtime painted all with uniform color. I want that mesh to have its color fade to transparent color close to the edges. Despite I searched everywhere I could not ...
1
vote
1answer
93 views

Uncontrollable platform spawning

I made simple spawner like this: void Update() { if (PlatformPosition.spawnNewPlatform) { NewPlatform(); } } public void NewPlatform() { if (active) { newTransform = ...
3
votes
3answers
134 views

Creating laser redirection (eg. Portal 2 Cubes)?

Okay, so I asked this question about 2 years ago, and revisiting my project, I'm amazed I still can't think of a solution. I seemingly can write basic adventure game engines from scratch, but Unity's ...
2
votes
1answer
85 views

Make a light only affect one object

I'm wondering if it's possible to make a light source only affect one object? I know that it's possible to use layers and culling mask, but then I would need one layer for every single object which is ...
0
votes
1answer
27 views

Massive CPU Usage by WaitForTargetFPS in the Profiler

So I was checking the Standard Assets Example Projects of Unity, and they all have high FPS numbers in the Profiler. I started a little project myself, just a simple sprite with movement via ...
1
vote
1answer
231 views

GUI.Box z-index for mouseover

So I am drawing an inventory with slots like so: private void DrawItemSlotAndAttachActions(Item currentItem, Rect slotRectangle, Event e, int itemSlotPosition) { if (!(currentItem is ...
0
votes
1answer
13 views

Add points to a prefab in Unity

I have a prefab that looks like this: I have created a couple of 'points' in the Hierarchy using 'Create Element' and I would like to attach them to the prefab, however drag and drop over doesn't ...
0
votes
1answer
12 views

Why does SpringJoint2D in Unity 5 doesn't have a configurable spring force like SpringJoint does?

I'm working in unity 5.3.4f1. Looking at the SpringJoint2D class I can't seem to find a similar "spring force" as in spring in SpringJoint. Is there any other way to make a spring stronger in ...
0
votes
1answer
19 views

Is it possible to debug a Unity Android game directly on a device?

I'm working on my game and every time I make changes to it I send the game to my mobile device to debug it. I want to know how I can directly debug my game using an Android device instead of the ...
3
votes
0answers
24 views

How to imbed one Unity project into another?

I'm creating an AI course in Unity. With regard to my question, there are two important properties of the course: Each tutorial is a separate Unity project that can be loaded up, allowing the ...
2
votes
2answers
2k views

Unity 5 Standard Assets for Linux / Ubuntu

Unity recently has released Unity3D Editor for Linux machines. But in its website there is no support for Linux / Ubuntu. As of Unity 5 standard game assets have been removed from the editor itself ...
3
votes
2answers
1k views

Unity2D: Automatic scaling of camera and sprites

I'm working on a point-and-click adventure game using Unity2D for mobile devices and possible PCs and I'm trying to wrap my head around supporting devices with different screen sizes and aspect ratios....
13
votes
1answer
176 views

how to automate the game testing?

I am new into this field of testing. I just developed a basic game using unity engine but i want to test it. I have checked with selenium but i don't know how to get the value that is being returned ...
2
votes
1answer
158 views

Detect walking on floor - works partially

I have a set of Gameobject blocks that form a floor with Box Collider and a GameObject with a Box Collider in it. My first hunch detecting hitting the floor was: void OnCollisionEnter2D(Collision2D ...
1
vote
4answers
47 views

How to find nearest gameobject on one side

Here is an example: The left enemy robot is closer than the right enemy robot, but I want the character to attack the robot that is closest to him on his right side. I can't use Physic.SphereCast ...
3
votes
2answers
609 views

Preventing a Combination of Rigidbody Jump Force & Bounce Magnitude in Unity3D

I'm building a fairly simple marble racing game in Unity3D. The ball is a 3D physics object that moves only on the X and Y axes. It has the ability to roll left and right, and to jump. Pretty basic ...