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)

0
votes
0answers
54 views

Load character instead of load level

I have some trouble finding out how I can load my character at the start of the level, instead of resetting the whole thing. The game mechanics are quite straight forward; don't touch the walls. If ...
0
votes
1answer
54 views

Scaling a UI bar for progress in Unity

I have created a progress bar inside Unity for one of my energy systems. The bar progression works fine. Its just a plane pivoted on one of the faces so scaling it in x axis makes it progress further ...
2
votes
4answers
137 views

.fnt font file offset issues in Unity

I want to display 2D text in Unity using bitmap fonts (.fnt files). There are some solutions out there, but I'm writing my own. Each character is a game object with a SpriteRenderer. It works. ...
0
votes
0answers
35 views

Does Unity's “Compression quality” affect ETC2 compression?

In Unity I am using "Advanced" texture options on Android with ETC2 8-bit compression. There is an option for "Compression quality" as described here: ...
0
votes
2answers
139 views

How can I optimize the size of my .apk?

I noticed that the Flappy Bird .apk is only around 900 KB. I'd like to know how I can achieve a similar optimization in .apk file size for my own games, which use Unity. A small single-scene game ...
1
vote
2answers
211 views

How do I choose an optimal texture size for a mobile Unity game?

I am developing a 2D game with Unity2D for Android, iOS, WebPlayer and maybe for desktop computers. I think the working resolution of my game is 1280*800. How do I choose the optimal size of ...
0
votes
1answer
63 views

Lookrotation of a gameObject in just one axis

So I am trying to orient a gameObject ( house in the picture below) which is nothing but a plane and has a 2d texture on it as you see below. The whole game is made on a hex sphere. I am using ...
0
votes
0answers
26 views

Integrate MoPub native ads in unity

I want to add MoPub native ads in one of my unity project.So,is there any way to achieve this.Cause I found that it works with web and Android or iOS native apps. Is there any way around to make it ...
0
votes
2answers
84 views

Touch sides of tablet, moves that direction

I am making a game where the player flies a balloon through a cavelike structure. I am having trouble making him fly correctly when I try it out on my android tablet, seeing as it requires ...
5
votes
2answers
277 views

Achieving 1 pixel outline around sprites which changes colour depending on the background?

Here's an example of what I mean: In this gif, when the character is on the dark background, his outline is almost black, whilst it retains more colour if the background he's on is the sky one. ...
0
votes
2answers
163 views

Accessing DualShock 4 motion sensor in Windows (ideally Unity)

I'm trying to use a DualShock 4's IMU as a motion controller in Unity, under Windows 7. So far I've tried: DS4Windows (1.5.11): reads motion sensor data, but does not expose them to Unity as axes ...
0
votes
0answers
51 views

Unity directional light for a day night cycle on a hex sphere

So I am trying to create a Day Night cycle on a sphere but it doesn't work the way I want it to. As the model is hex tiled, you see the edges of the hex tiles also lit up like below. I am using a ...
0
votes
2answers
75 views

Movement nudge instead of constant

I am making a small game where the player is constantly moving upwards, and I am having slight problems with the movement to the sides. The script located under works quite perfectly in itself, but my ...
2
votes
1answer
111 views

Get object length and width divided by two?

I have googled and found a script for the following task; Make the camera move to touched position. However, this script will jump to x and y positions on an object, while i would like for it to move ...
-1
votes
1answer
126 views

Unity 3D: Raycasting for gun hits

I am having trouble understanding raycast hits in Unity3D. I am trying to create an FPS game, so I have a gun, bullets and so on. My script for the bullets is: var Bullet : Transform; var Spawn ...
0
votes
1answer
95 views

Camera Touch Zoom and Pan with world - 2D

I am doing my first unity2d game and im in need of a little optimization for my camera. I have a camera which could pan and zoom with the speed i have defined. The problem with that is the speed i ...
0
votes
1answer
64 views

Raycast doesn't point on the right direction

The raycast line im rendering is acting weird, it doesn't point where I want it to. I want it to point from the yellow object to the selected one but it draws it at another position. Here is my ...
0
votes
1answer
45 views

Variable Variables in unity using JavaScript?

I'm working on a custom built save system for a project a friend an myself are working on. Currently all variables that are saved to file, are stored as static variables in a global variables script ...
-1
votes
2answers
70 views

Unity - Can't Shoot While Moving

Shooting does nothing while moving, but it works perfectly fine while standing still in my Unity project. As far as I can tell no one else has this problem. I just used the Character Controller first ...
0
votes
3answers
149 views

Do I need to learn any physics if I use a physics engine? [closed]

Complete novice out here. Of course I know basic physics like mass and inertia. I don't want to make an engine I just want to make a game and use a physics engine made by someone else. Do I need to ...
0
votes
0answers
103 views

How to overlay texture materials on top of each other in Unity 2D tiled game

I'm learning how to do a 2D tile-based game. So far, I have followed this tutorial which seems like a good starting point. With his method of building the raw triangles and then applying the uvs, I ...
0
votes
0answers
72 views

How to determine velocity from force

I recently started a project with the intention to master the physics aspect of Unity. Although I have a good knowledge of Unity, I never had the opportunity to work on game that makes extensive use ...
0
votes
3answers
142 views

Calculating the bounding box of a game object based on its children

2D game with Unity. Have a parent game object, with several children objects scattered all over the scene. I want to calculate the bounding rectangle of the parent game object. Let the black dots be ...
0
votes
2answers
84 views

Scaling a GameObject for a progress bar representation

I am trying to implement a progress bar system for my game. I know that it could be done with Unity's OnGUI and scaling with width of the texture but I don't want it to be a GUI element because in my ...
0
votes
1answer
49 views

Set a component on root gameobject for working all the children

I have a enemy which has ragdoll. So it has a few child object and each child has own collider. I dont want to add script for every child for just OnCollisionEnter function. All of them will work ...
4
votes
1answer
472 views

Consume input events in Unity 4.6

How do I consume the input events in the new 4.6 unity gui system? If I click on a button for instance I don't want anything else non GUI related that might be listening for mouse input to react to ...
1
vote
2answers
117 views

Does Unity load the texture data of all the sprites in a sprite array property?

using UnityEngine; using System.Collections; public class Test : MonoBehaviour { public Sprite[] mySprites; } From the editor, you can put sprites in the array property. I want to put ...
0
votes
0answers
27 views

How to detect which side of a collider has been hit in Unity? [duplicate]

I have seen this question asked many times and I even asked this question before but I didn't understand the answers(I am very new to Unity). So I am developing a game and so far I have a wall you can ...
-1
votes
2answers
84 views

Execute native ios code in unity

I want to execute native iOS code in unity. For this I have added two files in /plugins/ios. ViewController.h ViewController.m Code for each file represented as under. ViewController.h ...
0
votes
0answers
55 views

Breakout Clone: Ball isn't bouncing as expected

So I'm working on a Breakout Clone using Unity 2D Physics only, and I'm having some trouble with the bouncing effect. Every object in my Scene has a Bounciness of 1. First, this is the code of my ...
4
votes
3answers
270 views

How to generate a “loop room” in a platformer game (by Unity)?

I want to build a level with a room whose left edge is linked to right edge in a 2D platformer game in Unity. My goal is let all objects disappear in one side will appear in other side of the room. ...
0
votes
1answer
77 views

Building a unity game without textures? [closed]

For a school project I have to build a unity game. Since the focus is on programming and building the game and not on creating graphics (we are supposed to find free models/textures online) I'm trying ...
0
votes
1answer
194 views

How to lock aspect ratio when resizing game window in unity?

I want a scalable game window that when resized stays at 16:9 aspect ratio. The goal is for the user to be able grab the window on the right or bottom and resize it. The game should adjust the ...
3
votes
2answers
291 views

How to approach a coloring app?

I want to make a coloring app in unity. I don't need flood filling. THe player will select a color and click the shape to fill that color. The app will have designs as shown below: Here the problem ...
1
vote
0answers
66 views

Aligning a gameObject to position and normal of another gameObject inside Unity

So I am instantiating a GameObject (the one with cities and trees in the image below) and trying to align it to a hex tiles on a Sphere. So after I instantiate the gameObject, I ray-cast to get it ...
0
votes
1answer
44 views

Using RPC's for movement of an object across a network [closed]

I've been building upon http://www.gamasutra.com/blogs/DarrelCusey/20130221/187128/Unity_Networking_Sample_Using_One_NetworkView.php At the moment when I spawn a sphere on the server it spawns on the ...
0
votes
0answers
68 views

Unity How to stop a jump?

transform.Translate(Vector3(horizontal * speed * Time.deltaTime, vertical * speed * Time.deltaTime ,0)); Im new to unity and Im asking how to stop a jumping, cause if I turn on this script on char ...
0
votes
1answer
82 views

How to make an object that has no rigidbody2d component smoothly fall on the ground in Unty2d?

I have two character in my game: enemy and main character. Enemy can throw different objects into the main character. For this moment i am doing this action in such way: void FixedUpdate(){ if ...
0
votes
4answers
164 views

When would a mesh collider be better than primitive colliders

I have been reading through the Unity Manual and have come across some interesting information about mesh colliders and primitive colliders. It got me wondering if using many primitive colliders would ...
0
votes
1answer
143 views

Finding next AI move using MinMax algorithm for Checkers [duplicate]

I am currently working on a Checkers game using Unity ( human vs computer ) I am done with the base architecture of the game ie defining the rules, moves, jumps etc. I am currently stuck in ...
2
votes
1answer
202 views

Method Animator.SetBool sometimes is not working (or not triggering) in Unity2D

I have trouble with Animator in Unity2d. I have a main character for my game. The character has his own animation clip for fighting. When the player touches the screen, i am starting animation. When ...
0
votes
2answers
117 views

How unity works on Web

How Unity can work on Web if the code is written in C#? I understand that you can compile the C# code to a shared library and use it in Java (for Android) in ObjectiveC (for iOS) to enable Unity on ...
1
vote
1answer
175 views

Draw Primitives with Unity 2D

I would like to be able to draw primitives in unity 2d to define my game objects. I have tried the following example: using UnityEngine; using System.Collections; public class ExampleClass : ...
0
votes
1answer
62 views

Spawning a Sphere and trying to move it [closed]

I've been trying to build upon a blog post on Gamasutra http://www.gamasutra.com/blogs/DarrelCusey/20130221/187128/Unity_Networking_Sample_Using_One_NetworkView.php In this I would like to spawn a ...
3
votes
1answer
163 views

How do you make specific collisions in Unity?

So I have created a "game" where you are automatically running across platforms and you can jump and land on the top of them. I want to set it where if you collide with the the left and right side of ...
0
votes
1answer
170 views

How to make the damage inflicted to the enemy and the main character more unpredictable

I am developing a small mobile game. The enemy can damage my player by throwing objects at his side, and the player can damage the enemy by hitting him with a bat. For the moment, I am calculating ...
-1
votes
2answers
60 views

Collisions are not working in Unity [closed]

For some reason my collisions are not working. This is what the code I have. void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "wall") Debug.Log ("It worked"); } When my ...
0
votes
0answers
46 views

How to play only a part of animation in Unity 2D?

I want to make a progress bar in my game for show the amount of collected item in my game. I designed a animated sprite sheet from empty amount to full amount of the progress bar. My Question is: ...
-1
votes
1answer
51 views

How to temporarily disable input?

I have made a jump script and I want all input to be ignored when you are in mid air (so that way you don't have infinate jumps). How to do this?
0
votes
1answer
137 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. ...