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 (1)

3
votes
1answer
133 views

Distance travelled by gameObject and behavior depend on device's performance?

The distance travelled by my gameObject and behavior depend on my device's performance. If the device is slow for example, it takes longer to accomplish a specific task, thus travels at a smaller ...
2
votes
1answer
82 views

'Ball.rigidbody' hides inherited member 'Component.Rigidbody'

I have some understanding of c# and I am new to unity. I am currently making a 3D project which use the Rigidbody component on the ball object. When I use following code: public class Ball : ...
1
vote
0answers
249 views

Failed to spawn server object, Unity UNET

I'm familiar with Unity and programming but I'm new to this site. So I have an issue with clients on Unity. I start servers with no errors, flawless. But when I join a server as a client I get a ...
0
votes
0answers
38 views

Unity3d impossible to open / create project

i'm experience some trouble with the linux build of Unity3d. I suspect that my Nvidia driver give me some conflict, but i'm really not sure of this, so i'm asking: this is the error that i get in ...
0
votes
2answers
73 views

Optimal way to find point D that lays at the perpendicular line between point A and line BC

I am trying to write a script in C# to find the position of point D in 2D space in a specific scenario. I know the (X,Y) position of point A, which never happens to be on the line that contains the ...
7
votes
2answers
481 views

Pointers in C# Unity

Hey I've just learned about pointers recently and am wondering how I can use them in c# (I just learned about them in c++) in unity. I do have some questions though. Pointers use low level ...
1
vote
0answers
207 views

Using unity app how to read the asset in android SDCard?

I am trying to read one file from my android sd card from my unity application, but its not reading. using the asset bundle i have exported my file and kept in my android device sd card and i am ...
1
vote
1answer
55 views

Unity3D - leaving and then returning to a scene

Effectively, I need to know how to run a mini game and then return to a scene. I know about DontDestroyOnLoad (this); but that works for game objects only and doesn’t do what I need - also because ...
0
votes
2answers
126 views

Unity FP Character Can't Look Vertically

I have a FP Character and well, it can't look vertically. Its happened about 3 times now, each time I just replaced it with the standard assets prefab, first few times it worked fine, but then after a ...
0
votes
1answer
313 views

Unity 5 C# - onClick.AddListener in a foreach loop using lambda expressions

I'm trying to dynamically create Unity 5 UI buttons that each set a global variable decision_id to a different value when clicked. The problem I'm having with this implementation is that they all ...
0
votes
0answers
56 views

Unity - The Animation State Machine doesnt appear for Animation Overrides

I have a small state machine for the animations of the player. The foes that the player meet use the exact same state machine, so I just created an Animator Override Controller for the foes, ...
1
vote
0answers
302 views

Colliding without physics in Unity: is it possible to put OnTriggerEnter in the moving character?

My main question is: is it possible to put OnTriggerEnter in a script that goes attached to the moving character instead of to trigger area/object? Let me explain my exact need. I want to detect the ...
5
votes
1answer
130 views

In Unity, how can I cause something to happen on a specific frame of an animation?

I have a GameObject "enemy" with an Animator and several states, like "idle", "walk", and "attack". I want to activate the "hitbox" when an animation "attack" starts. The problems is that the sword ...
1
vote
0answers
37 views

3D model exported from Maya behaving weirdly

I have some 3-4 3D character models which are claimed to be exported with the same configuration from Maya by the 3d designers. Now, some of the models(animations) is working fine in Humanoid settings ...
1
vote
1answer
71 views

Transform.LookAt rotates the sprite and collision not triggering

I've applied the below script to a gun object to instantiate bullets to the direction of the mouse position. The bullet collision is not getting triggered since the bullet has been rotated. How to ...
-2
votes
2answers
233 views

How can I make 2D games like shovel knight? [closed]

To make 2D games like shovel knight, do I need specific software? Would this be possible to achieve in Unity or would I have to use something else?
1
vote
0answers
31 views

Drag and Flick Objects to any position (Unity3D)

In unity, I have several boxes in one cluster. I want the user to be able to move any of these boxes to any position that they desire in the app, and have it stay there until they move it again. Also, ...
0
votes
1answer
39 views

What determines the hit detection ordering for graphic elements in Unity (2d game)?

I have a bunch of overlapping buttons spread across several UI Canvases. The default mouse behaviour only registers hover/click events with one of the overlapping buttons, which is ideal for my ...
1
vote
0answers
59 views

Selecting Dictionary item based on custom classes instead of keys

I am attempting to write my own path finding code for a game I'm working on that will implement a form of the A* algorithm. I store my nodes of the path finding system as a class called nodes and add ...
1
vote
1answer
99 views

Unity3D - generating a set of rooms (scenes) and saving them

I'm having a problem wrapping my head around scenario like this. Say I've got a scene called Room. Now, my game procedurally generates content of each room. Entering a new room to see new content, ...
7
votes
2answers
190 views

How do I create a draggable object which snaps to obstacles in the way?

I bring yet-another-drag-with-mouse question (I am using Unity with C#), but with a less common particular detail: the existence of obstacles in the middle of the way trough which dragging occurs (3D ...
-1
votes
4answers
130 views

How do I implement an item that can hold other items?

I'm attempting to implement a "storage item" into my game. But I'm having trouble planning out how it would work. I already have an inventory system made, but this storage item is giving me trouble. ...
0
votes
0answers
37 views

Unity Parallax Strange Effect

I follow this Parallaxing Tutorial: https://www.youtube.com/watch?v=5E5_Fquw7BM for create a Parallax in Unity. I created a custom Script for my GameObjects like this (EDIT: this is in the Update ...
0
votes
0answers
85 views

Arm Inverse Kinematics to Hold Gun

I am trying to make IK to hold a gun, but hand is not rotating in the right way it always rotate weirdly. Here is my code hand.rotation = target.rotation; hand.position = lowerArm.position; ...
1
vote
3answers
207 views

Unity C# - Raycasts, How to Ignore Triggers?

Let's say I have a Raycast, but I don't want it to collide with any triggers. I don't want to change the Project settings since that's a little inflexible. How can I have a Raycast ignore any ...
1
vote
3answers
120 views

What's the most efficient way to find the position of a point in relation to corners of a rectangle despite rectangle's scale

I am struggling to achieve the following with C# (in Unity). I need to find the position of the points that lay at a given distance (let's say 1m) from the corners of a rectangle, in a way that the ...
0
votes
0answers
203 views

Unity 3D - Changing emission color in realtime after export doesn't work

I am using the following code to change material's emission color in realtime: Color selectionColor = new Color(0.3f, 0.2f, 0.0f); void Start() { ...
0
votes
0answers
14 views

NavMashAgent not moving

Here is my code. Im trying to move a Cube to CheckPoints. FindClosestTarget() method collect all Checkpoints. When Cube hit the CheckPoint, ChackPoint will be Set as Inactive. When the Collision ...
0
votes
0answers
17 views

Child object looktowards waypoint

hi guys how can I let my child character looktowards upcoming waypoint which can be on curve,slopes,hill.I have tried sevaral scripts but they are not giving proper rotation across all direction.Most ...
0
votes
0answers
29 views

Unity flipped everything in level

So, I have this problem, where my level shows backfaces instead of normal facing polygons. Even the terrain have the normals flipped and the axes manipulator and object manipulator are black. It use ...
4
votes
3answers
327 views

How can I detect if a gameObject has collided with two other specific objects at the same time?

How can I detect if a gameObject has collided with two other specific objects AT THE SAME TIME? This is what I intend to do but it does not work: void OnCollisionEnter (Collision col) { ...
1
vote
1answer
45 views

Unity LoadLevel Loads Late

We are developing a 2D game for Android on Unity. It's our first project, we don't have a lot of knowledge on Unity. We have 2 scenes, in first scene there is only a "Play" button. When that button ...
0
votes
0answers
99 views

First person view camera control using joystick in Unity3D

Can anyone give me any tutorial about how to program a first person camera control using joystick in unity3d? I've been searching for this for a long time and I'm out of depth unfortunately. I only ...
2
votes
3answers
197 views

Camera follows player but how to stop camera moving when player moves

The player is moving automatically diagonally down the screen, and I have the camera as a child on the player. I would like the camera to always be following the player (who sometimes slows down / ...
2
votes
1answer
48 views

Limiting x and y movement so you can't go off camera

So I want to make an on rails shooter like that of Star-Fox in the Unity engine. What I would like to do is limit the ship from moving off the screen. You move along the X and Y axis so i wont have to ...
0
votes
0answers
53 views

Unity 2d line with rounded curves

Is there's any way to create something like this in unity ? i've tried LineRenderer but ended up with twisted corners and doesn't works like i want .. Smomething like the first two shapes in this ...
0
votes
0answers
23 views

Determine a Joint target position from distance between connected objects

Not completely sure I'm thinking about this the right way, but i have a configurable joint (Linear Y) that is set to limited. I am using a target velocity initially and when that stops, i need to lock ...
2
votes
1answer
258 views

How will Unity games work on Chrome now that NPAPI is disabled?

As expected, this September Google disabled NPAPI in Chrome, which Unity Web Player relies on. As far as I know, Chrome now has its own API plugin API. Will the Web Player returning to Chrome without ...
0
votes
2answers
40 views

GameObject not exiting through leftScreen

I'm trying to wraparound game object so that, it exits through right screen and enters through left and vice versa. The code snippet below is what I'm working on. Vector3 Pos = ...
0
votes
0answers
44 views

{Unity3D} Script To Import Assets

I'm making a fps in Unity3D. I would like to know how to import a folder of assets with JS or maybe, but not preferably, with C#. The desired script will reference a directory and tell the code to ...
0
votes
0answers
65 views

Make camera follow player smoothly on curvey path

i am using following script to follow player,The problem with this script is it do follow player properly when player's X position is fixed but as soon as player make turn to right or left on racing ...
0
votes
4answers
194 views

Is database necessary? [closed]

Hi I have studied c# for good few months and I'm at intermediate level at the moment. And few days ago I decided to make simple 2D Games like "Mr Jump" after studying Unity. So my question is as ...
0
votes
0answers
34 views

BulletScript-Unity

I'm basically making an fps game in Unity. I have a player with a gun and i have a bullet prefab. I changed the mouse pointer to look like a crosshair. Now i need to know the C# script to make the ...
0
votes
0answers
76 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
1answer
62 views

How do i make an object to be visible only on a particular layer?

Please refer the image below to understand. I am working on 2D game. I have three elements: "background(layer 0), foreground(layer 1) and the object". I have used sprite renderer to set background ...
0
votes
1answer
325 views

Position Unity UGUI ScrollRect Content Position from Script

I have a map in my game the user can interact with. I am using Unity UGUI ScrollRect to let the user move the map on the screen. Only one area of the map is visible at a time and you can scroll it to ...
0
votes
1answer
29 views

deformable and variable text on a mesh in unity

So I am working on a sports game and I want the jerseys to be customizables with names and numbers. I have the character models as a single mesh however I can't place a text on the back of the jersey ...
1
vote
0answers
25 views

gazing and lip syncing in Unity 5.2

Is it possible to achieve gazing or lip syncing in Unity 5.2 at all, similar to Locomotion done through MecAnim?
0
votes
0answers
79 views

Use xbox right analogue stick for ScreenPointToRay

I have done a tutorial where the player rotation is controlled with raycasting which follows the mouse pointer. I have been trying to change it to follow the right analogue stick on a xbox controller. ...
0
votes
0answers
66 views

Unity C# event handler not triggered

I am trying out a system in my game in which I have 3 classes: EventService: MonoBehavior EventStore (a normal c# class) EventViewController: MonoBehavior EventStore registers some callbacks to ...