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)

2
votes
2answers
181 views

Different Screen Sizes and Camera in Unity

Now I know that no matter what the screen size is the camera will keep its height, so no worries about that. My question is, is there a way to manipulate the camera, either its orthographic size, or ...
0
votes
2answers
31 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
260 views

Raycast, UI and Update Question

I have movable objects in a scene. When Raycast hits an object, I have a hovering UI that moves to a retaliative distance from the hit object. When the object is dragged, the UI's position is moved ...
0
votes
1answer
38 views

PS3 controller with Unity on Mac

I am trying to use my PS3 Controller with Unity but it has been unsuccessful. I followed this video to do so: https://www.youtube.com/watch?v=LcettC1QHu4 I have done the same thing as the video but ...
0
votes
2answers
46 views

How to efficiently move in Unity2D? [duplicate]

If i want to use Physics in Unity2D what should be the most efficient way to move the object without interfering physics? 1. Transform.position 2. Rigidbody.Velocity 3. Rigidbody.addForce 4. ...
1
vote
2answers
16 views

How can I get width and height of grouped objects in Unity3D

Is it possible to get height and width of grouped objects like this? I tried boxcollider2d.bounds and renderer.bounds. Each shapes in the group has collider component. Is it possible?
2
votes
2answers
875 views

Can't clip a sprite that has a custom shader in NGUI

I am using NGUI. I have an "NGUI Unity 2D Sprite". This sprite has a material with this shader: Shader "DM/Ripple Shader" { Properties { _Color ("Color", Color) = (1,1,1,1) ...
0
votes
1answer
65 views

How can I instantiate in the current rotation in Unity 2d?

Backstory I'm currently working on a 2D sidescroller/platform game as a hobby, and I just started recently. Followed a few tutorials and such I managed to wrote my own code for basic command like ...
0
votes
1answer
211 views

Can't see instantiated UI element

I'm trying to create a level editor for a 2D game and I wanted to instantiate radio buttons, the backgrounds and numbers of which are determined by the tilesheet I load. I'm sure I'm doing something ...
0
votes
1answer
13 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 ...
-1
votes
0answers
14 views

Unity3D-C# - Resetting WaitForSeconds() on IEnumerator Coroutine

Mmmmm I dunno if I need to show code for this, ´cause this is more of a general question regarding a resetting of a StartCoroutine, or of the yield WaitForSeconds method. Because when I start the ...
0
votes
1answer
146 views

Sending message to all players in room from Photon server?

I need to send a message to all players in the room from a Photon server. Sending the message from a player would introduce too much latency so I need the server to collect data and distribute ...
0
votes
2answers
48 views

Object shrinks at same rate no matter what

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) { ...
-1
votes
0answers
17 views

How to throw an object Unity3d platform? This 2D

There is a platform revolving around its own axis (it works). We need to make sure that when you change the angle of the object platform rolled (it works), and the sudden change in the direction of ...
0
votes
1answer
41 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
43 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
2answers
27 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
28 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
78 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
33 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 ...
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. ...
2
votes
1answer
46 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
4answers
51 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 ...
4
votes
0answers
22 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
230 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
364 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
29 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
52 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
272 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
222 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
26 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
45 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
51 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
17 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
0answers
25 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
64 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
309 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 ...