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
1answer
88 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
26 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 ...
2
votes
1answer
29 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
18 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
97 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 ...
1
vote
0answers
12 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 ...
2
votes
1answer
253 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
14 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
84 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
278 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
494 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
92 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
130 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
21 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
11 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
7 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
18 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
17 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
173 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
40 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
606 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 ...
1
vote
2answers
10k views

Unity 5 missing Standard Assets

I have Unity 5 and when I make a new project, there are no assets that are usually there (Character Controller, Terrain, etc.). How do I fix that?
1
vote
1answer
34 views

ScriptableObject not working after build in Unity?

I have a GameObject with a ScriptableObject on it, stats. It works fine in editor but when I try to build I get a message, A script behaviour (script unknown or not yet loaded) has a different ...
2
votes
1answer
215 views

Changing scene while joinin room and RPC buffer problem

I have a button to create and join a random room in my main menu. After the client joins (or creates and joins) a random room, i change the scene to game(main) scene in "OnJoinedRoom" function. It ...
1
vote
1answer
25 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
164 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<...
1
vote
1answer
18 views

How to make a visible area in unity3d

the simple way to explain it is an image I want to have a black background and to show only a small area around player. Which way I have to look? I have no clue where to start searching :) Thanks.
0
votes
1answer
48 views

Make a person walk faster when standing on plane/panel in Unity?

Is it possible to make a person walk faster when standing on plane/panel in Unity without writing a lot of code? If so how? I am using the standard asset first person movement prefab.
4
votes
1answer
79 views

How can I get Unity to tell me the battery status of my OS X laptop?

How do I get battery status on an OS X laptop in Unity? This is un-Googlable: I keep finding either mobile stuff (iOS or Android) or people complaining about laptop battery life.
0
votes
1answer
32 views

Combining lots of small polygons to one (some) big poly(s)

I am looking for algorithm to merge lots of relatively small 2d polygons to one or some big polygons. In case two small polygons are touching or overlapping, they should be merged to one polygon. My ...
1
vote
4answers
86 views

How can I determine which Trigger is hit?

I have a GameObject. It has 3 BoxCollider2Ds: Body Collider - Not a trigger - Determines if body is hit Weapon Collider - Trigger - Determines if weapon is hit Vision Collider - Trigger - Determines ...
0
votes
3answers
2k views

Find closest point on NavMesh if current target unreachable

I have a mock environment set up with a cube that has a specified "Not Walkable" layer. I'm using NavMeshAgent and NavMeshPath to set destinations of the player. The way I'm setting paths is by ray-...
3
votes
2answers
83 views
+100

Gfx.WaitForPresent performance issue

I am making a 2D mobile game and it runs really well (60 fps) on my phone. However, in some cases the performance goes down drastically to the point where it runs at 20 fps or even less. It happens at ...
0
votes
0answers
16 views

Unity 5: Turn slippage in Rigidbody + Capsule Collider which disappears with addition of Character controller

I play the animation from the raw mocap data with my character loaded into the sample window animation...however, the character slips when turning. The current configuration is capsule collider + ...
0
votes
3answers
281 views

How to access multiple 2DTexture which is assigned in Unity3D inspector panel created by an array in C#?

I am making a puzzle game, i made 5X5 cube, lets take example of orange. very left column is orange, upper with orange dot is static and lower with orange dot is also static. inbetween there are 3 ...
1
vote
0answers
25 views

Map video texture to a half sphere in Unity

I'm new to unity3D. and am trying to play a 360-degree video. But instead of mapping the whole 360-degree (equirectangular) video to the whole sphere, I need to map the half-video to a half-sphere ...
5
votes
2answers
55 views

Force Reload VS soution Explorer when adding new c# Script via Unity3d?

When I create C# script (Create -> C# Script) via Unity3d or delete it from Unity3d - Visual Studio shows me the warning window. it's annoying. Is there any way to force "ReloadAll" in ...
1
vote
1answer
32 views

Should I slow down my animation with co-routines or update the animation state?

I want to gradually stop the car animation as it collides with another car gradually speed up the car animation as it exits the collider I have two ways to achieve this. Update Co-routine For ...
0
votes
0answers
26 views

Zoom camera on player

I am developing a simple side scrolling game. I want to target and zoom camera on player when he dies. But it rotates the screen, and I want to prevent it. I'm copying the snippet of code here : ...
0
votes
0answers
22 views

Unity C# - The object of type 'Object' has been destroyed but you are still trying to access it

I have a cube on a plane and I'm tring to move it to certain locations. I've baked the area and added a navmeshagent to the cube. My moving script for the cube looks like this: using UnityEngine; ...
3
votes
1answer
239 views

Local avoidance together with any-angle types of A* Pathfinding

Recently I have been implementing the Block A* any-angle path-finding algorithm in a project I have, for which I need extremely efficient results due to the large number of NPCs. However, I still do ...
0
votes
0answers
15 views

How to force download unity asset bundle using php?

I am downloading asset bundle using <?php $file_url = 'http:XXXXXXXXXX.com/AssetBundle/bundle-numb'; header("Content-Type: application/octet-stream"); header("Content-Transfer-Encoding: Binary"); ...
1
vote
1answer
37 views

Can't access properties of a class

Sorry for the bad title, but I couldn't think of a way to word my problem for a title. So I have this script, with two classes: using UnityEngine; using System.Collections; public class GameItem { ...
1
vote
1answer
168 views

Store Player Stats

My character creation order is: Select Race, Select Class, Assign Bonus Stat Points, Customize and Name the character. Because I am using Unity's UI components I am using scripts attached to empty ...