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
2answers
38 views

Handling accelerate in different devices

Hi I am adding tilt controls to my game.The sensor values I get are differ in different android devices which result in random behavior... Anyone knows how can I tackle this situation? I tried ...
0
votes
0answers
6 views

How to “mark” a track/ road?

I'm developing a simple racing game, using Unity. I've created a road simply applying a texture (asphalt) to a terrain . Is it possible (and how to do) to mark that roard with an invisible marker to ...
0
votes
2answers
10 views

Cannot overlay text?

I'm trying to make text have a fixed position in world space and be overlayed in screen space at the same time. I have text in canvas with "Screen Space - Overlay" which covers my text located in ...
0
votes
2answers
12 views

Unity inspector script - making it save the global variables for what it's creating

I have a script which initialises a bunch of child gameObject(s). I wanted all of this to happen outside of the game, so I created an inspector script which has a button which triggers the method ...
0
votes
2answers
75 views

Add singleton to an existing gameobject in Unity via script

I did notice that if I assign scripts that generate singleton classes (for my managers), to an empty game object, everything works fine. Now I would like to start the scene with the empty game ...
0
votes
1answer
23 views

Advice on Story Text-Based Game

I am currently in preparation on making a game. This game will be looks like Lifeline by 3 Minute Games, which is a story text-based game. My game will have the same concept with it. Where there will ...
1
vote
2answers
36 views

How to efficiently move in Unity2D?

If i want to use Physics in Unity2D what should be the most efficient way to move the object without interfering physics? transform rigidbody.Velocity rigidbody.addForce
0
votes
2answers
68 views

Picking a 2D Box Collider with the mouse in Unity

I have a scene with a bunch of 2D doors that have 2d Box Colliders (no trigger) on them and that live on a Canvas. I would like to be able to click on them with the mouse, but have had no luck. ...
0
votes
0answers
18 views

Script no longer working now that it is attached to a child object. Why is this?

So I decided I wanted to make this script part of a separate swap-able weapon so I made a child and put the script there. Before the script worked fine but now it won't work. The script works as ...
1
vote
1answer
38 views

Player motion and combo systems

Where do you usually implement player motion when going through the state machine of a combo system? An example, when player presses X+Y it must do an uppercut like movement (Like street fighter) ...
0
votes
0answers
2 views

Finer collision detection with multi-path Polygon2DCollider from Tiled2Unity

I'm in the process of incorporating Tiled2Unity prefabs into my code. Their exporter creates a collision object (shown below) that amalgamates the collider of each tile into a single Polygon Collider ...
0
votes
4answers
47 views

Managing data for large number of levels in Unity?

I am making a Unity game vaguely in the vein of Candy Crush Saga for a client and am moving in circles trying to decide how to manage the data for all of their levels. In brief, they want to divide ...
3
votes
0answers
19 views

Why Can't I duck reverb on the mix bus in Unity?

i'm surprised there is so little documentation on this issue. But i'm trying to duck the audio on all the mix buses in Unity so that you can clearly hear the VO of the game. Now it works great except ...
2
votes
2answers
226 views

How do I change the mesh in an existing prefab in Unity?

So I made a prefab some time ago and now I want to change the mesh without changing any scripts. I have an OBJ file I want to use. Is there any way to do this? I've read the documentation but I don't ...
1
vote
1answer
363 views

Create a WebGL native plugin

I am trying to create a WebGL plugin and I read in the docs here: http://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html But I'm not sure I understand. I created a file in ...
0
votes
2answers
28 views

Plugins for creating and styling custom Editor Windows like C#/C++ Form Designer or “Web Inspector”?

Unity3d allows to construct window with custom UI. Just need to use EditorGUI/EditorGUILayout classes and their static methods. Example of custom window: The problem is that all the components have ...
0
votes
1answer
51 views

Script for non-stop enabling/disabling “Is trigger” on collliders2d in Unity3D?

I had asked before that I have a problem with too many colliders in one spot and that some upgrades of towers I have are buggy due to that. It has come to my notice, that whenever I enable the "Is ...
0
votes
2answers
271 views

How to properly give Image source for multiple sources?

I'm writing a script to change the image on the button based on previous selection. Another script is giving the CurrentAvatar variable once previous button is pressed. My problem is i can't seem to ...
0
votes
1answer
218 views

Unity-UI not scaling correctly on android

My UI appears extremely small when i build and launch my game on my android device. Im working with unity 4.6. I've tried changing the UI scale mode of my canvas to all 3 types. Scale with screen size ...
3
votes
0answers
23 views

Oculus Rift on Motion Simulator Platform

I currently develop a VR environment for an existing (physically) large motion simulator platform. The user can sit on this motion platform and gets accelerated and tilted to induce the feeling of ...
0
votes
1answer
108 views

Unity3D - Using AddRelativeForce to push an object forever in zero gravity environment

Ok, I use AddRelativeForce to basically push an object. But it suppose to keep flying and keep accelerating as I hold down the key because I didn't set gravity. I just started Unity3D last month, so ...
0
votes
2answers
42 views

How to make the wheels rotate depending on the speed of the vehicle

I want to know what the right formula is, or a way to make the wheels rotate with the speed of the vehicle? What is the standard way to make wheels look realistic and natural? Do developers use other ...
2
votes
2answers
3k views

Unity Android Unable to convert classes into dex format AdMob

I'm a beginner Unity programmer (school-age), so I don't know that much about the system. On its own my app compiles fine, but when I implement the AdMob SDK (Google) 2.1, I have the following error ...
2
votes
1answer
136 views

Increment grid by rotation

I'm currently working on a grid for snapping objects side by side. My current script is working fine, but only for game objects which haven't been rotated. Here is an example video of the problem: ...
0
votes
0answers
45 views

What is the best way to add a grid to a 2D tile city builder?

Alright guys, I'm new to Unity and Game-making, forgive me if theres a obvious answer or an existing answer. I've searched a failed. I'm trying to create a small 2d top-down game in unity. It's ...
0
votes
0answers
20 views

Low intensity of projector in dark enviornments

I am using light Projector as Headlight for player bike....The thing happening is the intensity of projector reduces in dark environment whereas in normal sunny day projector brightness is proper ,. ...
1
vote
0answers
16 views

Unity WebGL responsive

I am trying to embed Unity WebGL to a web page. I wonder, is it possible to make this responsive, so it will always fit whatever the screen size? How to do that? Thank you for answering.
0
votes
2answers
43 views

Shrinking an object at a given rate

I am using the following code to shrink a sprite: public bool shrinking = false; public float targetScale = 0.1f; public float shrinkSpeed = 0.1f; void Update () { if(shrinking) { ...
0
votes
0answers
24 views

Why does my player gameobject jump up at an accelerated speed when I move forward or backwards?

I've been working on my own custom character controller for a little while now, and almost everything has been working fine, except for jumping. Whenever I move forwards or backwards while jumping, ...
2
votes
1answer
60 views

Why create meshes instead of using Planes?

I'm working on a top down 2D game in Unity and I want to create levels dynamically. All tutorials I find tend to talk about generating meshes so I've followed some great tutorials such as this one. ...
1
vote
1answer
241 views

How to detect collision position and that position's texture color in Unity?

I have a prefab and I use Circlecollider2D for physics operations. I want to detect the color of the contact position of the collided objects ? Is is possible by using Unity's collider classes ?
0
votes
0answers
8 views

Is it possible to not include or erase AABB data from a procedurally generated mesh with Renderer?

I am procedurally generating many thousands of very simple meshes with very simple texture (the same for all meshes and instances) in Unity (5.3.4) with C#. Currently they take more than 100MB in ...
4
votes
3answers
1k views

How do I access a Unity class from an Android Activity?

I have made my own C# classes in Unity. How can I access them from the Android Activity that starts the UnityPlayer? Example: I have a C# class called testClass in Unity: class testClass { ...
3
votes
1answer
731 views

Avoidance Steering Behavior acting inappropriately

I've been trying to implement this steering behavior in Unity: Understanding Steering Behaviors: Collision Avoidance However, I'm getting strange results. Here's the code for the script, feel free to ...
1
vote
1answer
307 views

Create sprites from 3D models at runtime in Unity

From my previous post where I search solutions to have animated characters in an isometric world (using 2D engine as base) arised this question. I'd like to create and instantiate 2D sprites from 3D ...
1
vote
1answer
163 views

What can I do in Unity3D to optimize the way I'm calculating contrast of a texture2D?

I have this contrast script right now in Unity: public void ApplyContrast(string contrast) { try { double contrastD = Convert.ToDouble(contrast); //Make ...
2
votes
1answer
251 views

Animation conversion failed: transform for bone not found?

I'm trying to animate my first humanoid, and the animations in the Standard Assets pack (HumanoidIdle etc) work really well right out of the box. However, when I try to use other fbx files, like those ...
1
vote
5answers
2k views

Unity procedural TileMap generation without creating gameobject per tile

I've been searching all over the internet to find a efficient way to create procedural tilemap without creating a gameobject per each tile. There is none, or simply i couldn't find it, because i ...
1
vote
1answer
40 views

How should I construct a Facebook Login Flow for a server-less Windows App in Unity?

I am game programmer with limited web experience that was tasked to figure out how to make our game interact with Facebook. We are building a Unity Windows standalone app (maybe MacIntosh later), and ...
1
vote
1answer
428 views

How can I use a lookup table for brightness and contrast?

Currently, I implemented a rudimentary brightness and contrast algorithm that changes brightness and contrast pixel by pixel. This was super inefficient performance wise and the algorithm looked a bit ...
2
votes
1answer
337 views

submeshes and dynamic batching doesnt work as expected

I'm duplicating one object with submeshes frequently, and assigning a random material from five materials to each submesh. There is batching happening, but it's not quite as efficient as I would have ...
-1
votes
0answers
19 views

How to read from .json [on hold]

I have data in .json file.I am looking for ways to parse it in c#. My json contains data like this, {"howManyToSpawn":1,"positions":[1],"difficulty":0} ...
0
votes
0answers
40 views

how to simulate tank tracks(something that is around all wheels, dont know what is called)

im trying to simulate the part of tank that rotates around all wheels and i dont know what is a good way to do that. can you give me some hints to do that?
0
votes
1answer
23 views

How to “properly” display a 2d sprites in a 3d environment?

I would like to show "the classic" missile lock viewfinder (the target symbol) of a war aircraft. So the target symbol must follow the enemy, and became red when "lock" it. So i thought simply to ...
1
vote
1answer
158 views

Unity apple/google ID access?

After extensive Googleing I have not come up with a way to access Apple ID's or Google ID's from unity running in respective devices. Either ID's or something else unique to the accounts logged in. I ...
2
votes
1answer
258 views

How should asset bundles be divided?

The only way to load an asset from an asset bundle into memory is to load the entire thing, decompress and pull out the asset you want, then unload the entire thing, except the assets you want. This ...
2
votes
1answer
24k views

Correct way to use a GameObject.Find method in Unity C#

I have been following along with a Lynda.com video course to familiarize with Unity. I am currently attempting to grab a reference to a scene's First Person Controller's transform as follows: ...
0
votes
1answer
134 views

Unity 4.6: sprite image automatically splits to single sprites when clicking

I'm viewing Unity tutorial. As in this tutorial, I see when author clicks to sprite image, they will automatically divide to each frame as below: But in my Unity, I just can view this: So. My ...
0
votes
1answer
18 views

Printing out a 2d array in Unity [duplicate]

I have a 2d array of type char. Its sort of the Model that goes with my Checkers board View so I can run the logic/rules on the array. If I was writing a console version I'd just do a nested for-loop ...
1
vote
1answer
20 views

How can I tune material values with the slider in the Unity inspector more finely?

I'm adjusting a material's texture tiling and offset values in the editor but its increments are too large and it's jumping over the value I need. Is there a way to slow it down or adjust the amount ...