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)

1
vote
1answer
45 views

Darkness Emitting Light Source Unity

I was wondering if it was possible to create a light source in Unity, one that "sucks" light from the environment. Negative value does not seem to work in Unity, as pointed out by many. It is quite ...
0
votes
0answers
28 views

how can I load a sprite to a sprite variable in my script?

I want to add to my Sprite variable x2 a sprite in my code. Here's my code: Sprite x2; void Start () { x2 = ? } how can I tell the code to add a certain sprite to that variable?
0
votes
1answer
21 views

How can I add an IsTrigger propriety from code? Unity

I made an gameobject in my script and i made it a rigidbody, and added it a boxcollider, but I dont know how to tell the program to make it a trigger. Here's my code until now: multi = new ...
0
votes
0answers
26 views

Unity terrain engine [closed]

I bought the yughes pines and bushes v2.0 and when i grab the default bushes and put them on the tree tab and then place a bush it says "Must use Nature/Soft Occlusion shader. Otherwise billboarding ...
0
votes
0answers
28 views

NavMesh.SamplePosition() fails after rebaking NavMesh?

So today I was refurbishing a scene when this happened. After baking a new Navmesh the SamplePosition() returned only infinity. I tried a lot of things out but eventually went back to an older version ...
0
votes
3answers
38 views

can someone help me with this code for my platformer. ive been working on the script for an eternity but unity keeps saying there is an error [closed]

using UnityEngine; using System.Collections; public class player_controler : MonoBehaviour { public float moveSpeed; public float jumpHeight; // Use this for initialization void ...
0
votes
1answer
21 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 ...
0
votes
1answer
34 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
2answers
72 views

In Unity3D, how do I move the camera with the mouse without spinning it on its axis when looking down/up?

I'm currently trying to recreate how Space Engineers work with their first-person acmera in Unity 3D. I'm currently stuck on how to make sure the camera doesn't spin around its axis when looking ...
0
votes
1answer
54 views

How to save variables into a file unity

I've wanted to save progress of my game (i don't have the code , sorry) without using PlayerPrefs. If it's possible ; with UnityEngine.
0
votes
1answer
57 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
0answers
61 views

Working with UI programming - How Scaleform is useful? [closed]

I'm a programmer (with some low design knowledge) and I would like to work with UI programming for games. I've been trying to research how to go dipper in this field and till now what I found was to ...
1
vote
1answer
28 views

Design basics for Unity game: sport management type

I am planning the classes for my game; and I am having problems to figure out the best way to connect them. In my game I do not have the classic structure of say a FPS; where you have the player ...
0
votes
0answers
30 views

Are CreateOrthonormalBasis and OrthoNormalize equivalents?

I've been looking at the functions in Unity's Vector3 class and Unreal's FVector class. I have been trying to find overlapping functions from each but can't figure if CreateOrthonormalBasis and ...
0
votes
0answers
18 views

Is character controller for 2d too?

Unity doesn't mention anywhere in manual. In a 2d physics platformer I'm using rigidbody2d to my player.So can character controller be used in 2d game? If not are there any easier option than dealing ...
0
votes
1answer
39 views

How can I save a score for a web game made in Unity and load it when the game starts again?

In other words, how can I load the progress for a game? I only want to store a score and load it again when the game starts (ex. if I get the 100 score and close the game, when I come back, I want to ...
4
votes
3answers
63 views

Multiple Colliders in Collision

I have an object that has a front collider, left collider and right collider. When a collision occurs, I notice that there are situations where the front collider and left collider/right collider has ...
0
votes
0answers
49 views

what makes good component base code in unity engine? [closed]

I have read a little on it, but still don't think I can appreciate what makes for good, maintainable component based code. Please suggest some principles to consider? As is, I really dislike the code ...
0
votes
0answers
97 views

Unity 5 blendshape on a part of mesh

I have a blendshaped face mesh on rigged character in Unity 5. I imported whole character with face from Maya using .fbx format. But I'd like to have a single mesh (body + face) since having separate ...
1
vote
1answer
56 views

Unity C#: Game Object Movement Issue

I'm trying to move a game object within a set x and y range. I thought the code below would work, but it does nothing. The idea is the player controls the platform and tries to move under the ball. ...
1
vote
0answers
24 views

Avoiding audio transcoding in Unity?

I'm working on a project where I only have access to MP3s versions of audio tracks I'd like to use. Unity is trying to be helpful and recompressing everything as Vorbis, which is not ideal due to ...
3
votes
1answer
77 views

Getting unity to act the same way in a test as it does during runtime

I've just started using unity tests with the built in editor tests. After making my test and finding out that it constantly failed I debugged the code and found that a static object was set to a new ...
0
votes
0answers
33 views

How to darken certain parts of my scene, Unity3D

I'm trying to darken certain parts of my Unity3D scene (an enclosed room to be specific). I've tried researching this, but couldn't find anything. I've read that using Lightmapping and Light Probes ...
3
votes
1answer
39 views

Unity camera tilt

I'm programming a camera for an RTS and I'm stuck on tilting the camera up and down. I want the camera to tilt between 20 and 70 degrees using the Z and X keys. This is my code: using UnityEngine; ...
0
votes
1answer
40 views

What is the semantic meaning of the position of Unity's transform component?

What is the meaning of the position in a transform component of a game object in Unity? Is it the center of mass?
1
vote
1answer
23 views

Can't call GameCenter in my Unity game for iOS

I'm trying to integrate Game Center into my Unity 5 project and facings troubles. It seems that authentification is OK when the game starts on iOS device, a notification appears, but leaderboard ...
1
vote
0answers
13 views

Unity: onEditEnd and onSubmit only firing from Return key

I have an InputField in my UI, but currently I can only submit its contents via the Return key. I tried mapping other buttons to the Submit action (e.g. the tab key on keyboard and the X button on my ...
-1
votes
1answer
49 views

WebGL - Open URL in new tab? [closed]

How to open URL in new tab for WebGL? Tried Application.OpenURL("url"). But it's opens a tab in same window Thanks
0
votes
1answer
71 views

When using Unity 5, is there a way to print/save/identify the last n lines of code that were executed at a specific point?

So, here is what I am after. Is there a way to identify which were the last n lines of code that were executed in Unity 5 (with C#) at a given point of the game? I know I can use Debug.Break() to set ...
0
votes
3answers
103 views

Problem with Input.GetKeyDown to set a counter in Unity: multiple values in only one pressing

Using Unity 5, I want to use have one keyboard key ("f") increase a counter when pressed. It means, using Input.GetKeyDown("f") function in a way that: if "f" is pressed when the counter=1, then the ...
0
votes
0answers
23 views

Unity WebGL Facebook and Google+ Share

I'm creating game for WebGl on Unity 5.3.0 I need to share a screenshot to Facebook and Google+ from user's profile Already created an app on Facebook Developers site and downloaded latest Facebook ...
0
votes
0answers
12 views

Creating 2vs2 room with friends in Unity with PUN

I would like to create a game mode 2vs2 with our friends. I have no idea where to start off. How can we send them notification regarding some of our friends is looking for party. I think this is ...
1
vote
1answer
34 views

Check if GameComponent is ready in Unity?

I am trying to create a MessageBox in Unity, but I'm having some troubles in C#.. This is my code (I'll explain my problem later): MsgBox.cs public class MsgBox : MonoBehaviour { private ...
0
votes
0answers
35 views

Oculus DK2 won't display Unity 5

I am having a problem with my game showing on my Oculus. I checked mark "Virtual Reality Supported" in Player settings. When I run the exe, I right click to use the option to play on Rift, but it just ...
1
vote
2answers
88 views

How are methods like Awake, Start, and Update called in Unity?

I'm developing with Unity 5 and I know that there are some methods you can use like in the code below: public class MyGameElement : MonoBehaviour { private void Awake() { } private void ...
2
votes
2answers
86 views

How to make an event happen only at the first start of the game?

I want to know how to make something happen only once like a tutorial in a game which appears only when you first start your game and then when your game got saved to a further point it never appears ...
1
vote
1answer
47 views

Entity Interpolation (Lost Packets?)

I'm working on a networked game for a while. I'm aware of client-side prediction and lag compensation (shooting) but I'm not sure about entity interpolation client-side. I'm sending update/sync ...
0
votes
1answer
37 views

Rigidbody stuck on the edge of two colliders

could You please help me with that weird bug? I've seen other people's posts about that bug, but I couldn't really understand how to fix it. As You can see, the boxes are standing right next to each ...
0
votes
0answers
14 views

Parse RestAPI in Unity WebGL build not working on Google Chrome

I am trying to integrate Parse in Unity Webgl build. As there is no specific SDK for WebGL provided by parse so for parse communication i am using RestAPI to Get the data from parse. As provided in ...
1
vote
2answers
46 views

Continous repeatable object/image moving horizontally unity3d

I want to move objects on the screen horizontally. And the user has to pop the object by touching it. When user touch it, it gets destroyed and new object comes randomly. For experimenting, I used ...
1
vote
1answer
23 views

How do I run an APK in a device from the Unity IDE without rebuilding the binary?

I know that the button Build creates the APK in my disk. And the button Build and Run creates it and sends it to a real device if connected via USB. Question: Is there any way to "Run" from the ...
-1
votes
0answers
37 views

How can I make a 2D object not exit the map in Unity?

I want to make my square stop when it hits the limits of the map. How can I do that?
3
votes
1answer
71 views

The better performance in occlusion culling, plane or quad?

In the above picture, when the left camera shows two small parts of the quad, all of that is rendered (it can be a very large quad). But in the right one only two small parts of it is rendered. ...
1
vote
1answer
25 views

Bring GameObject in front of GUI Texture

I have a GUI Texture that dims the screen, however I want certain game objects to not be dimmed. I tried putting them in front of the GUI Texture, but it doesn't work. How can I do this?
1
vote
2answers
48 views

transform.Translate only for 10 units?

How can I transform.Translate (Vector3.up * Time.deltaTime * 2); a GameObject for 10 units? I mean only make it go up 10 units (10 y units).
1
vote
2answers
23 views

Ball passing through box collider

My ball which has a circle collider 2D component occasionally passes through my box collider2D object. Both objects have rigidbodies attached. I have set a high mass for my box collider and a small ...
0
votes
1answer
44 views

How to make Frame Independent Timer Clock

I want to make a frame Independent Timer that it work consistently across different computer configuration.
0
votes
1answer
43 views

How to get dynamic RigidBody rotation/tilt on uneven platform?

I have a rigid body with PolygonCollider2D which has some complex circular shape and I'm using uneven platform. Im using Following code to move the object forward CharacterRigidBody.velocity = new ...
1
vote
1answer
40 views

Send Messages in Update Function Button UI Unity 5

I've been working on a project where i need to fulfill the following behaviors: 1) when clicking anywhere in the screen the character should do something 2) there are some buttons so except when you ...
0
votes
1answer
24 views

Can Soomla directories be safely moved one directory down in Unity?

I'm integrating in-app purchases in my game. To do so, I chose to use Soomla (http:soom.la) asset. I use the free version registering for the grow bundle. I've downloaded a unitypackage named ...