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
91 views

Change pivot so that it is always orientated to world space (Y axis is always UP)

When I create a model, I may use different primitives as a base and change them into their final state. What I am noticing when they are imported into unity is that they come in sideways, and offset ...
0
votes
0answers
39 views

Display problems with iPhone4s and Unity

I'm having an issue with the screen on iPhone4s. I calibrated the camera's viewport size depending on the screen resolution. This has given me buggy results on the 4s since ther e is a black stripe of ...
1
vote
3answers
653 views

How to make a horizontal scrolling menu in Unity 3d 4.5

I want to make a horizontal scrolling menu that will hold levels of the game .But i have a little idea about it so it would be very great if anyone help me with it
1
vote
2answers
3k views

Loading .PNG file and using it for UnityEngine.UI.Image

Have an Unity UI Image. I want to load a .PNG file that is in my persistent data path and use it as the sprite source for the UI Image. Code: byte[] bytes = ...
0
votes
2answers
194 views

Unity question on OnTriggerStay() function

I'm currently working on a soccer game.I have a script for the ball that whenever the ball collides as trigger with the goal line,the ball will return to the middle point.But seems like the ball ...
0
votes
0answers
19 views

Separate each model part by “CRTL+MouseLeft”

I have a model,I want to separate each part of the model by using "CTRL+Mouseleft.I have done the part separation by clicking on each part.Now I need to separate each part by "CRTL+MouseLeft".How can ...
0
votes
0answers
37 views

why the camera didn't capture gui position properly?

I make an GUI.DrawTexture and it's draggable, i want to make my GUI detect 3d object when i drag it to its position. The method works properly with guiTexture, but when i used it for GUI.drawable the ...
3
votes
2answers
2k views

Place an UI Image between two 2D sprites in Unity

I am developing a 2D game with Unity. I have two sprite objects rendered using SpriteRenderer. With the new UI system, I want to use it to display an image between my two sprites. That is, my first ...
0
votes
1answer
201 views

How to make a model parts glow one after the another

I have a brain model. I want to glow the parts of the brain model one after the another after a period of time. I have done to glow the parts, but when the second part glows, the color of the first ...
1
vote
1answer
49 views

How could I get composite rigid body into unity

I am developing a game, in unity, that has accurate destruction physics and from my understanding unity uses plain old rigid body physics. I was wondering if there was a way to bring composite rigid ...
0
votes
1answer
770 views

Accessing Canvas and Button components in a scene

I have a scene with the following hierarchy: This is game scene and the game manager is a singleton with the following variable fields: // canvas public Canvas PauseCanvas; public Canvas ...
1
vote
1answer
1k views

How can I merge multiple sprite into one sprite or texture using Unity3d?

I have an avatar generator where someone can create a custom avatar with layers superimposed. And in order to reuse this image multiple times, i want to merge all layers in one image. Is there any way ...
0
votes
0answers
382 views

How to play video in Unity Free on Android (may be using external open source libraries like ffmpeg)

I need to play video file in my game and I am using Unity Free. The solution with rendering images with a certain delay is not suitable for me, because my video file is made from over than 300 images. ...
0
votes
1answer
203 views

Discarding triangles in Unity

I have about 2+ years of experience in computer gaming development and I just started writing my own shaders to help me utilize performance. I have this problem that I'm trying to work around but ...
0
votes
1answer
500 views

Play continuous music when swapping between multiple scene in Unity3d

I have the following scenario Main menu scene containing a gameobject with an audio source component An about us scene gameObject script : using UnityEngine; using System.Collections; public ...
1
vote
1answer
3k views

Changing color of UI Text in Unity into custom values

There are a few objects in the scene as well as a title. I want the title to change its text and color based on the object that is mouse-overed. The script below is added to each object that is ...
2
votes
1answer
3k views

Button stays highlighted after being clicked - Unity3D 4.6 GUI

Sometimes, after clicking a button created by unity's new UI Button, the button stays in its highlight state. Note that Button script has Color Tint set as it's Transition property and the ...
1
vote
2answers
271 views

NPC daily routines and scene loading

I'm making a basic survival RPG in Unity 3d. I'm separating my world into different scenes to save memory but I'm not sure how I'm going to program NPC daily routines. For example, if the player ...
0
votes
2answers
175 views

Will changing the scale of objects in Unity have adverse effects?

Relative to what they are by default, I mean. For example compared to the character controllers that come with Unity. If I make the character 4 times the size, will that cause problems, with the ...
0
votes
0answers
142 views

Configuring touch input for a mobile game?

I'm trying to configure my game to take touch input from buttons but my scripts don't seem to be working. Here is the script for receiving touch input: using UnityEngine; using System.Collections; ...
0
votes
2answers
275 views

How to make a gameobject Scale up from another GameObject script

hi there im having a rought time with this code, trying to make a gameobject grow in scale from touching this one, and when a set amount of scale is reached destroy this game object ( the one who ...
1
vote
3answers
98 views

Unity2D: Apply gravity to some items, when everything else is gravity-free?

Sorry for the incredibly vague title: Let's say you have an NPC, and when he dies he'll spawn items, coins for example. Instead of just pushing the coins in random directions it would look a lot ...
1
vote
1answer
435 views

Is there a way to exclude original sprites in spritepacker that's in asset bundle?

I use spritepacker with assetbundle. It's working great. Its memory assumption is about just 8 MB. However, when I looked at the disk space that asset took on android phone, it took about 25MB. Which ...
0
votes
2answers
132 views

Unity2D Best way to determine degrees between two colliding entities?

I'm trying to determine the collision-direction between two objects. I'll be using this for various things such as creating blood-entities in a specific direction proportional to where the other ...
0
votes
1answer
59 views

How to change animation view in Unity3D?

How can I change the animation view in Unity3D? I have only some "dot", but I want to view some curve! How do I change this? What I have: And what I want: (image from the documentation of Unity3D)
0
votes
0answers
25 views

having an issue in unity3d (free version) where an audio source is not being affected by reverb zones.. reverb bypass is disabled.. anyone? [closed]

Having an issue in unity3d (free version) where an audio source is not being affected by reverb zones.. reverb bypass is disabled.. anyone? The source is having onehits run through it via a C# ...
0
votes
0answers
135 views

Using modo for Unity level modelling?

Is anyone using modo for modelling level meshes for Unity here? I'd like to know how to set up modo so that I can use the grid in modo and it will reflect 1 meter. I've set in modo preferences Unit ...
2
votes
1answer
366 views

Trying to extract file icons and use as a sprite texture

I'm trying to extract file icons from the files inside a folder (eg: Program Files), and have them set as my Sprite's texture. I extracted the file icons, converted them to Bitmaps and then to byte ...
4
votes
1answer
200 views

How do I access the “Ascii Start Offset” property of a Font at runtime?

When I create a "Custom Font" in Unity 4.6.1, I get this: "Ascii Start Offset" indicates which character is first in the font. I've set it to 48 (the zero character) by hand, and my custom font ...
1
vote
1answer
185 views

Why does Resources.Load cause a CastException in this case?

I am doing this: string fontName = "freespin_big"; TextAsset xml = Resources.Load<TextAsset>(fontName); Texture2D image = Resources.Load<Texture2D>(fontName); Font font = ...
2
votes
1answer
166 views

Can I post to Facebook with my own text from Unity on behalf of the user?

I'm using Facebook SDK for Unity 6.0 with FB.Feed. I'm trying to post a link to the user's feed, text and link on his behalf. So far I've managed to publish only a link and its details, the part ...
0
votes
1answer
932 views

How to programmatically disable sprite renderer and mesh renderer in Unity3D?

In my game, I have an empty GameObject that has a sprite and a TextMesh as child. I want to access the child (sprite and the text mesh) and turn off the sprite renderer and mesh renderer of the sprite ...
2
votes
1answer
108 views

Event error: “…can only be called from the main thread”

I have some custom networking classes which I'm trying to use in a unity game (c#). The network class raises events, which I want to subscribe to in the game code. However, whenever I try to do ...
2
votes
2answers
468 views

3D models on 2D background perspective mismatch

we are working on a tactics game, with a hand drawn 2D backgrounds and 3D models moving on them. The game generates a 2D grid placed on a XY plane, with faux isometric tiles (Diamond Grid). I have ...
1
vote
2answers
949 views

Resetting a level in unity when exiting to main menu

I have a pause screen in my game having two buttons : resume game and exit to main menu The main menu have only 1 button wish is play, when i click on exit to main menu the main menu level is ...
0
votes
2answers
130 views

Unity: Trying to add a simple light to a prefab

A bit of a unity beginner here. I have a windmill prefab and I would just like to add a simple point or directional light to my prefab. I added the component for a light to the prefab and started the ...
0
votes
0answers
34 views

How to rewind time on just the main character? [duplicate]

I have a 2D sidescrolling game and I want the character to be able to rewind time on him if he messes up. I don't want anything else to change, just the main character's position. Any idea how I can ...
0
votes
1answer
121 views

GameObject is only rendered when it has a negative z scale

I have an orthographic camera that looks like this: I create 2d polygonal meshes that have uniform z values in their vertices. I use Camera.ViewportToWorldPoint() to map these viewpoint vertices to ...
1
vote
0answers
61 views

How do I correctly set up a Unity animation to move?

I downloaded a custom .fbx model from the asset store, imported it to my project and placed it in my scene. I then created an animator controller and added it to the object. To get the animations ...
-2
votes
1answer
221 views

How can I parse the leaderboard data returned from Google's API?

We're developing our first Android game and we want to get leaderboard data from Google Play Game Services and use the score data from the different leaderboards. I am able to use Unity's WWW class ...
1
vote
1answer
77 views

Can I set a texture as the wallpaper of an iOS device?

I have a game in Unity which creates drawings. I need to have a button which sets the drawing as the wallpaper (with permission from the user of course). Is it possible?
2
votes
1answer
246 views

In-Depth Lockstep Explanation

I'm making a multiplayer game built upon a lockstep system and I'd just like a better grasp on the concept. My main question is on how to get every command to simulate at the same time on every ...
0
votes
1answer
133 views

Mesh Generation In Code [closed]

My camera looks like this: I am trying to add 2D polygons to the screen based on the percentage that they take up of a 1920x1080 pixel canvas. Therefore, I calculate this and then use ...
2
votes
1answer
524 views

Unity3D: Disable player input but not character movement?

I'm trying to code a dash/air dash for a 2D platformer. In my character controller's FixedUpdate(), I have various if statements that cause certain actions when a button is pressed. To disable player ...
1
vote
2answers
95 views

Unity access method from separate script

I'm learning Unity3D and I'm practising accessing game object scripts from other objects. For the most part I've got it down, but I've run into a weird issue causing a NullPointerException. I've set ...
0
votes
2answers
2k views

How do I create a simple clickable button?

I've tried to attach this function to the play button. public void Play () { Application.LoadLevel("Scene1"); } I've created an empty Game Object and attached my script to it. But when I go to ...
0
votes
1answer
127 views

give a prefab clones a script from another prefab in Unity3d

I have the following : TurretBallmanager : using UnityEngine; using System.Collections; public class TurretBallManager : MonoBehaviour { // Use this for initialization public GameObject ...
0
votes
1answer
100 views

Unity: Object is underneath another object but shouldn't be

I have a simple collision detection program. The red object is controlled by the user and the yellow object is always moving up and down: However, when the objects are supposed to collide, the red ...
0
votes
2answers
123 views

Stop Unity UI Buttons from being clicked when a Facebook Window is overlayed

Having an odd issue. When I play with the Facebook SDK for Unity, and the Windows popup like the login window or the Friend Selector window, if I use the mouse to click in the window I end up clicking ...
1
vote
0answers
236 views

Make FPS Controller in Unity suitable for Touch? [closed]

I have a standard fps controller in my app that is controlled by default via mouse. What is the best way to make it touch friendly? Is there something that needs to me modified in the FPSController ...