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
1answer
83 views

Creating Unity games for older versions of Android? [closed]

In the Unity editor, the lowest available Android version for debugging is Android 2.3.1 In my case, I have a phone running an older version of Android and I intend to publish my game to a wide ...
2
votes
1answer
100 views

How can C# access JavaScript variables in Unity 5?

I have a static public boolean in a JavaScript and I want to access it in a C# script. When I tried the way that you would call a static variable from another script though, it said that the variable ...
1
vote
1answer
70 views

Zoom out more in Unity

I am making a sphere with the radius of earth (6371000 meters). I have only limited zoom out and that makes it impossible to add something on the terrain. If I press F, it does not zoom out further ...
2
votes
1answer
76 views

Find out hit child with RaycastHit

Let's assume having a (2d-) gameobject with 3 images: Head, body, feet. By using RaycastHit2D I can find out if the gameobject was hit (for example by the mouse): RaycastHit2D newSelectedObject = ...
1
vote
2answers
71 views

Unity: Interactive menu with sprites changing with buttons

I have a menu where the player gets to choose which team and kit he will use to play. However I don't really know how to change the sprite each time the left or right arrows are pressed. I already ...
4
votes
1answer
150 views

Unity's Quaternion.Lerp slows down when target is directly behind turret

Software: Unity v5.2.1f1 Personal I am trying to achieve the effect of a turret in Unity. For this I have a turret consisting of 3 parts as well as a target. The problem is that whenever the target ...
1
vote
2answers
175 views

Position UI.Button to mouse position

This has been discussed a couple of times, but I didn't find any solution: I want to set the position of an UI.Button to my mouse position. I can get the mouse position like this: Vector3 ...
0
votes
2answers
80 views

How do I make sprites overlap eachother based on a layering system?

In Unity, I am building a 2D puzzle game, however I need to make sure that certain sprites are rendered on top of other sprites when they are above them. Here is an example switch (left) and block ...
1
vote
2answers
110 views

Trailing dots effect

I am making a "Don't touch the spikes" remake in unity C#. I want to make the effect of the dots behind the bird like in the image below. How can I do this?
4
votes
3answers
159 views

How to test for adjacency?

I need to come up with a better way to test for adjacency in a grid environment. Imagine that the blue is water, the green is land, and the red dot is a character. What I need to do is efficiently ...
2
votes
1answer
93 views

Realistic angular velocity for rolling sphere in Unity 5.1

I'm trying to make a small 2D game with a rolling ball/sphere using Unity 5.1, but if find the angular velocity of the ball weird. On this first image (http://imgur.com/8wBoGms), you can see the ...
1
vote
0answers
94 views

Unity: Can I use sprites for tiles to overlay a grid over a plane mesh?

I have a plane mesh in Unity. I have various other meshes on this plane (props) with tags that denote the areas under these props are unwalkable. I raycast, project and generate a grid on this plane ...
2
votes
1answer
238 views

Unity 2d diffuse sprites not rendering on mobile

EDIT: Just an update, did change from sprite/diffuse to Diffuse and zordering of my level using t2dtk map stuff was backwards. Like the camera flipped around so i had to shuffle things around on the ...
0
votes
0answers
25 views

changing the main object picture,according to input

I am making a simple game in unity c#.The game is about blade that fly and collect coins. I want to make a shop where the player can change the picture of the main character in the game. I had make an ...
2
votes
1answer
409 views

unity - problem in limiting rotation of object?

I am trying to make a game with unity. In this game, player uses mouse to rotate a container or box around x and z (rotate to left and right and also toward the camera and opposite). I used below ...
1
vote
2answers
135 views

Unity 5 C# collision problems

I want to make the built-in FPS controller collide with an object and switch a boolean to true. Here is my code: public static bool WellGUIOn; // Use this for initialization void Start () { ...
1
vote
2answers
65 views

List of Lists for sending paths from client to server? [closed]

I have a client server scenario and I'm looking into distributed AI. I want the server to move x amount of ai characters around a map by pathfinding and then send the x amount of paths to the client ...
1
vote
2answers
77 views

Interaction between GUI and character(s)

This is more a question about architecture. Not sure if there's a right or wrong: Let's assume I have some gameobjects: GUI: A menu containing some elements like "Go to position". It's opened when ...
1
vote
1answer
66 views

Texture not working on object

I have a project that I'm having a bit of trouble with. Let me try and explain. In short, I'm trying to apply a texture to an object, but instead it is a solid color. I built a building in "Autodesk ...
2
votes
1answer
97 views

Where/how should A Star tie breaking occur?

I've recently written a path finding script that utilizes a basic implementation of the A Star algorithm. It works fine but is not very fast. This is due, at least in part, to the fact that it isn't ...
0
votes
1answer
47 views

Changing the duration of motion state transitions in Animator Controller

Anyone around who is experienced with Unity animation states and the Animation Controller? I wonder is it possible in Unity to change the duration of time it takes between motion transitions in the ...
1
vote
2answers
75 views

Unity2D - Save everything in a scene before loading another and come back to it?

So I have am into this endless runner thing where everything is generated randomly from prefabs. Okay cool! But I am currently working on a bonus collectible which takes the player to another scene. ...
1
vote
1answer
141 views

Unity — custom shader behaves differently on WebGL deployment (correct) and editor view (incorrect)

I started working on shaders and lighting on Unity3D 5.2.1f1. I set up a scene where the sun object rotates the directional light (the only light in the scene) based on its position to simulate a ...
2
votes
2answers
463 views

Board like strategy map

I want to make a strategy game like Risk. I want to use C# for the mechanics and Unity for the graphics. My problem is that I don't know how to create the map itself and integrate it with C#. I ...
0
votes
1answer
92 views

Unity Animated Player Character Rotation Glitch

I was wondering if anyone experienced this issue in Unity with Mecanim-animated characters ... I have an animated player character with a third-person camera control (Game Camera from the asset ...
1
vote
1answer
38 views

Editor-only circular contour around prefab instances

I have a prefab with radius setting, which programatically controls circular area with some stuff. I want instances of this prefab to display a circle with this radius in editor for convenience. ...
0
votes
0answers
123 views

Unity - principle of moving GameObjects / AddForce vs MovePosition vs position.transform

having generated a Mesh with MeshColliders as Terrain i want to move gameobjects in a RTS way along the map. i searched the Web alot, but iam having troubles figuring out HOW to move my Character ...
1
vote
0answers
75 views

How to make dynamic DOF from mouse position in Unity 5?

I found a video a while ago for how to make a dynamic DOF in unity. It fires rays from the camera and positions an empty at the location that the ray first hit. How can I change this so that it ...
3
votes
1answer
598 views

masking with 3d object in unity

I have a 3d plane in my scene and some 3d objects behind that plane. So, i want to render only the part behind the 3d plane. So how should I do this, should I have to use custom shaders, plz help.
3
votes
2answers
614 views

Implementing a 4x4 Game Board

I struggle with efficiency in code, and I want to start my game off on the right foot. I have a game that I'm making a 4 x 4 map of 'tiles' that a user can build their 'town' on. To keep track of ...
1
vote
0answers
268 views

combining multiple materials into one material (Unity)

I am confused with how should I texture my character. I am using blender for modelling. And while my model is too complex I dont want to use uv map techniuqe. I can get what I need with using ...
1
vote
0answers
73 views

How to make lens flare ignore layers work with first person character in Unity 5?

I have a simple lens flare on my directional light (sun) and I would like the flare to only be visible when the sun is directly visible, naturally...But right now with the default ignore layers, the ...
2
votes
1answer
204 views

Keeping an object constrained to a 2d radius based off of the camera

A few weeks back I posted a question about keeping an object on the screen. What I would like to do now is clamping an object around a 2d radius based on the camera. I'm need this for a reticule ...
2
votes
1answer
577 views

Combining several animations into a single FBX

I'm trying to figure out a workflow for preparing character animations for Unity so that they are all combined in a single FBX file. The advantage as far as I see it is that it then uses only a single ...
3
votes
1answer
360 views

Unity - Where do Animation Events fit in the Script Lifecycle Flowchart

I was looking at the Script Lifecycle Flowchart and suddenly I got thinking about Animation events. Where do they fit, inside this flowchart? In which position would they be executed?
1
vote
0answers
25 views

Converting Unity .fbx model to .stl using the exporter?

We bought this script asset from the Unity store. We need to run it to convert some .fbx files to .stl. Is there any simple guide on how to run a script from the asset store?
1
vote
1answer
184 views

How do I quantify the curvature of a touch swipe?

I'm implementing a touch controller for my game. I am attempting to imitate Tiki Taka Soccer's "ball shooting" controls (gameplay video), where the curvature of the player's swipe affects the curve ...
3
votes
1answer
107 views

(2D) Take player speed into account while shooting bullets

In my top down 2D game, there is a plane as shown below: The plane shoots bullets forward. For firing bullets, I use: obj.GetComponent<Rigidbody2D>().AddForce(transform.up*500); However, ...
2
votes
2answers
120 views

Most efficient way to get the world position of the 8 vertexes of a Box Collider (C#)

What I am looking for is the most efficient way to get the world position of the 8 vertexes of the Box Collider of a freely rotated Gameobject. I cannot use collider.bounds since object is rotated, ...
1
vote
0answers
55 views

Trouble creating fog and lighting in unity

I am trying to create a model in unity that looks like this picture by Escher I can create the lattice, however, I can not create the fog and background/lighting effect. When I adjust the fog in ...
1
vote
0answers
50 views

Unity based washing/ cleaning game advice

I'm thinking about a way I can create a washing/ cleaning game as part of a project I'm working on within Unity, but given my lack of experience, I'm having trouble knowing where to start. The goal ...
3
votes
1answer
174 views

How can use a 3D map with 2D characters (Unity)? [closed]

I tried to search something about it but I can't find any complete or well-explained tutorials about how to use a 3D map with 2D characters and items, like Ragnarok or Final Fantasy Tactics. If there ...
1
vote
1answer
116 views

Unity + Texturepacker: Pivot point in weird positions

When my designer sends me the spritesheets done with Texturepacker and I open them with the Sprite editor, i notice that the pivot point is in extremely weird positions. Way above the spritebox that ...
3
votes
1answer
911 views

Vuforia AR/VR sample with Google Cardboard SDK: I cannot switch from augmented reality to virtual reality

I have followed the Integrating Cardboard to the AR/VR Sample latest tutorial. I have configured the provided scene sample according to that tutorial. I have compiled it to Android without any ...
1
vote
2answers
48 views

(2D) Simple AI is not working when Object pooling is used

I am building a top down 2D plane game for practice. Here, enemy has an AI script attached. AI script does the following : Determine whether the object is spawned to the left or right of screen. If ...
1
vote
2answers
88 views

Unity doesn't show always the score

I don't know if this issue is in Unity or in my script, the score work well in scoreText, but in the scorePanel its show before last score like it showing 1 rather than 2; the issue doesn't always ...
1
vote
1answer
46 views

Concerns about APK version compatibility

I'm making a game in Unity, and i want to know if I generate the apk in version 4.1 Jelly Bean he will run in newest versions of android? Can anyone explain me better how the version works?
1
vote
1answer
65 views

2DRaycast is shooting slightly in wrong directions

I wanted just a simple 2DRaycast, which points from my character to my mousePointer. So I found the following code in the Internet, most people seem to use it like that. So I tried it, but it isn't ...
2
votes
2answers
133 views

preventing a camera from getting stuck inside a mesh in Unity

I've a 3rd person camera similar to Mario64. Currently, I'm working on preventing the camera from getting stuck inside a mesh. The goal is to move the camera overhead. This much trickier than I'd ...
1
vote
1answer
347 views

Why is Raycast hitting masked layer?

Many questions have been posted on this topic but I'm facing a weird behavior which I could not find an explaination for. I perform a raycast giving it a LayerMask parameter which is defined as ...