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)

1
vote
0answers
36 views

How to find or compute or look for overall/max RPM by simply checking for rotation?

I find it hard to determine the wheel RPM since I'm only making a simple 2D game of rotating object via Z-axis. I wanna try this solution but I got no change since I'm trying to find the RPM from a ...
1
vote
1answer
97 views

Seams between tiled textured cubes

I've created a textured cube in Blender, which I have uv-mapped like this: The tiles are 256x256, and I've mapped the coordinates exactly at the edges (e.g. x: 256, y: 512). I then export my model ...
1
vote
1answer
73 views

Limiting Bounds of Camera

I'm using the following code which I've taken from Unity and edited it a bit, but I seem to misunderstand the right way to actually add bounds to the camera controls and the way to implement the ...
0
votes
1answer
71 views

Unity AddExplosionForce to a Navmeshagent

the navmesh agent is intaracting with the exploding object, explosion occurs and agent takes damage but no pushback occurs. expodingobject using UnityEngine; using System.Collections; public ...
3
votes
1answer
205 views

Coroutine stops when Time.timeScale = 0

I have a coroutine that smoothly changes a variable in my UI, but when I pause the game, the coroutine pauses too. How can I fix that? Code: using UnityEngine; using System.Collections; public ...
-5
votes
1answer
65 views

New to game development [closed]

I have some programing experience, and I have tried making some games. I have some knowledge with c#, but I am much better at python. I have a general code structure knowledge, so I am open to learn ...
1
vote
1answer
80 views

Animation Scaling?

I have an animation that changes the scale of the GameObject but also happens to change the position as well. I do not want the position to be changed by the animation, only the scale. How can I do ...
-1
votes
1answer
69 views

Enemy Retargeting

i am trying to make a game using navmesh agent in unity,where the enemies first attack the player and change their target to tanks when player spawns them.then again retarget player after the tank ...
0
votes
0answers
77 views

Laying an hexagonal 3d grid on a 2d-isometric game

I'm trying to create an hexagonal grid for my 2D game, but I got stuck when determining what exact angles/rotation for this 3d plane to have in order to fit with the current 2d isometric art. So right ...
4
votes
2answers
94 views

Problem in if statement comparing GameObject name

I am trying to get the name of the game object. for that i used Debug.Log (gameObject.transform.ToString()); in start. My gameObject name is "PowerupItem_0" and "PowerupItem_1". in console it ...
5
votes
3answers
201 views

How can I launch a GameObject at a target if I am given everything except for its launch angle?

I have been working on this one for a few weeks, and I have yet to succeed. I have searched every resource out there, and tried them all, but still without success, so I do not believe existing links ...
1
vote
1answer
38 views

Problem finding correct value for Yaw

I use an Arduino and a 9dof sensor ( gyroscope, accelerometer and magnetometer ) and i'm trying to use the pitch, roll and yaw that the sensor gives me to rotate an object in unity. I managed to ...
1
vote
0answers
46 views

How to generate mesh at runtime using raycast points?

I'm trying to make a clone of the trail/line renderer with the difference that everything is perfectly flat, i.e. the faces are not designed to face the camera. I'm using two raycasts to get the ...
0
votes
1answer
51 views

Code vs. Configuration in Unity [closed]

I know a thing or two about Unity at this point, but I've still lots of subjective, best practice questions, Such as: How do you decide what values are obtained via Start/Awake initialization, and ...
0
votes
2answers
124 views

Bullets doesn't do any damage

I have a melee enemy tagged as enemy. enemy has two coliders: a capsule(physics) and a sphere(for attacking player in radius and istrigger) and a particlesystem, enemy has enemyhealth script attached. ...
0
votes
1answer
235 views

How to access a variable from another C# script in Unity

I am working on a simple game project, and have a problem. The problem is accessing the variable from one script to another. For example :- I have 2 Scenes (Game Scene and Game Over Scene), Game ...
2
votes
1answer
58 views

Looking for a clever way to differentiate objects [closed]

I have a lot of cubes in my game (2d squares) and I decided to add some skins to them. However the colors that they have don't really make them look appealing. For example, I have this sprite: ...
1
vote
0answers
24 views

Collision destroy a cube when player collides [closed]

Unity- I have a mesh named and tagged as player I want that when it touches a Cube it should get destroyed C# script I need ....ty
1
vote
1answer
849 views

Unity UI Text Font Size changes with the screen resolution Problem

I am working on a project and now I have a problem . The problem is the font size. The font size is OK inside the Unity but it is really small when I play the game on a real Android device . My ...
1
vote
1answer
141 views

Unity 5.2 default 3rd person controller makes character fly upwards when moving forward

I'm new to Unity and already dealing with a problem.. using the default third person controller script I am trying to move and animate player. But I have a problem that as I try to move the character ...
4
votes
2answers
120 views

Unity 3D C# - Shifting beetween worlds?

Let's say I want to replicate Planeshifting from Legacy of Kain: Soul Reaver in Unity. There are 2 realms: Spectral realm and Material realm. The Spectral realm is based on the Material realm, only ...
4
votes
1answer
116 views

save a particular area of the scene as screenshot in unity

I need to save a particular part of the scene as screenshot. I have done a sample to show the particular part of the scene. When I click on the rectangular area the selected area will being shown ...
1
vote
1answer
150 views

How can I locate GameObjects near the player in Unity?

I'm trying to figure out how I can find GameObjects that are close to the player so that I can delete them with Destroy(). I know how to use Destroy() but I can't figure out how to get a reference to ...
1
vote
2answers
78 views

Can Unity4 and Unity5 projects coexist in the same computer?

I've Unity5 installed (free edition). When I started with Unity3D I did with 5 and never had the 4 before. A friend has passed me legacy code of a 90% complete game he used to do with Unity4 as he no ...
1
vote
2answers
87 views

Detecting first or second Mouse Button Release?

I want to know how to detect if the user has released the mouse button the first time, or the times after that: Pseudo-Code: if *first* (Input.GetMouseButtonUp(0)) { do something } ...
0
votes
1answer
79 views

Health Bar is always 100% full

I have this GUI to graphically display a variable similar to the health in a game. The variable 'test' goes up and down during gameplay. To show this I have the following onGUI (): public GUISkin ...
0
votes
1answer
32 views

Hang script on the button in unity [closed]

When you click on a hand should trigger the script. I do not understand how this script to the button. Here's a script, even though he can not correct: using UnityEngine; using System.Collections; ...
0
votes
0answers
16 views

Buttons duplicated on game scene

I have this set of buttons in a monobehaviour class: public GUISkin btnskin; public Texture2D emptyTex; public Texture2D fullTex; public Vector2 pos = new Vector2(20,40); public Vector2 size = new ...
0
votes
0answers
308 views

Face Detection in Vuforia Unity Android

I am working on face detection in unity.I have tried out a face tracking sample from the below link.It worked fine https://github.com/marcteys/unityFaceTracking The problem is that,when I runned the ...
0
votes
1answer
74 views

Use constant force to hold something in position

This may actually be more of a Physics.SE question but since im doing this in Unity I figured I'd ask here. I am playing around with the Constant Force component and have a sphere constrained with a ...
3
votes
1answer
269 views

Unity - How to get UI text to follow an object?

I'm a relative beginner trying to learn Unity, and I'm trying to do something that I thought would be relatively simple: Have a piece of text hover over an object, following it if it moves around the ...
0
votes
2answers
50 views

Should I use Coroutines to change variables in inspector smoothly?

I want to change the aperture of the depth of field in the camera smoothly by using Mathf.SmoothDamp and a Coroutine, however, since I'm new to game development, I don't know if this is the right way ...
0
votes
0answers
72 views

Unity Player Smooth Left - Right Movement

I am learning Unity 3d . Now I want to move the player object (The Ball) , Left and right by Left Arrow and Right Arrow key . I want smooth movement when the player goes left , but I don't know how to ...
1
vote
0answers
45 views

Mirror problems after building game in unity

Hi I am facing a weird problem in unity when I build a particular scene. Here is the screenshot of how the mirror looks when I play the game from inside the unity editor: And here is how it looks ...
0
votes
0answers
59 views

Unity - _LightMatrix0 and Directional Light

I am trying to access the _LightMatrix0 in a forward base pass to calculate some light point of view coordinate but it seems that the _LightMatrix0 is empty with directional light. Any idea how can I ...
2
votes
1answer
98 views

How can I make a ball glow and cast light?

I want to make my ball glow and cast light on other objects in the scene. The scene is generated at run time so I believe baking is out of the question. Emission materials work only when the object ...
-1
votes
1answer
98 views

Sprite disappears on android

I am programming a game in 2D for android and pc/mac. The sprite is the same and it's visible on the pc/mac. But once I use android and move the sprite, it disappears. The code is this: what could be ...
-3
votes
2answers
120 views

Buy or make assets [closed]

As an indie developer, I don't know if I should make my own models or buy them from the asset store (unity engine). I do know basic modeling in Blender, but I also have spare money that I can use to ...
0
votes
0answers
57 views

Rolling Dice (Rag doll?) Unity 3D

I am creating a mobile application right now. I have 2 3D models which are dice, i want to be able to just swipe across the scene and move the dice, like a rag doll. But i am confused on how to ...
0
votes
0answers
50 views

transform.Find() doesn't find the specified object

I am learning Unity and C# and I've hit a wall trying to use the transform.Find() function. I am following Brackeys' tutorial for 2D platformers (https://youtu.be/m-J5sCRipA0?t=10m53s) and using the ...
13
votes
3answers
3k views

What's the difference between UnityEngine.Random and System.Random?

What's the different between this int randomNumber = UnityEngine.Random.Range(0, 10); and this // on top of the class private System.Random _rnd = new System.Random(); // inside a methode of the ...
0
votes
1answer
1k views

Unity WebGL not loading on chrome

I've made a simple game but when I tried to load this on chrome its not loading. I am building for WebGL (HTML 5). I am getting these errors when the page loads. Unity version - 5.3.1f1 Chrome ...
0
votes
0answers
47 views

Unity: Bypass Ctrl+S in a custom Editor Window

Is there a way to bypass Ctrl + S for Windows or ⌘ + S for Apple default behaviour (save scene) in a custom editor window?
0
votes
1answer
80 views

Click event doesn't trigger when clicking

I've made some buttons on my screen to navigate to other scenes of my Unity project but the Click(string command) method doesn't trigger. I've placed a breakpoint on the bold line in code below, but ...
0
votes
1answer
171 views

Shader change alpha depending on light

I use Unity, and I need a shader a bit special. Unfortunatly my skills about shaders are very limited and I need this shader quickly. So I want a shader to display a unlit texture on a plane, and ...
0
votes
0answers
64 views

How do i disable inherent scaling of bone joints in Unity?

Is there a way to disable inherent joint scaling in unity? In other words, stopping child joints from inheriting multiple scales from each bone higher on the hierarchy. Basically I want each joint to ...
0
votes
0answers
15 views

How to scale a bush mesh to 4 when it can only be scaled to 2 in the tree editor in unity

I had bought a unity asset (Yughes pines bushes v2) and the scale of the bushes is too small and so i put the scale to 4 and when i add the bush as a tree in the terrain editor it can only scale to ...
2
votes
2answers
1k views

Why doesn't my C#6 code compile in Unity?

Why can't Unity work with C# 6 code? It always gives me compiler errors. Here are some code examples: using static System.Convert; using static System.Environment; ...
0
votes
0answers
79 views

Singleplayer and multiplayer using same gameobjects in Unity?

There are a lot of topics about converting singleplayer to multiplayer games. But I could not find the accepted practice of keeping singleplayer gameplay available. Will this just work if I manually ...
0
votes
1answer
149 views

Continuous Jumping Cycle

The script makes a GameObject jump using realistic gravity and reach a specific target. The GameObject jumps relative to the target, thus adjusting its trajectory. It also works while the target point ...