Tagged Questions

Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end.

learn more… | top users | synonyms (1)

0
votes
0answers
2 views

NHibernate over Mono in Unity, connection string problems

I'm using NHibernate in Unity, and running the project in the debug environment works great, but when running the compiled EXE, I was getting a NullReferenceException when trying to access the ...
0
votes
0answers
11 views

How can I use a texture as a font in Unity3D

I am making a game in unity and I am trying to make a custom font for showing numbers. I created a png with the numbers, turned it into a material and added it to a custom font object. I set up the ...
0
votes
0answers
7 views

How to control animationClip though scripting or button pressed

I am stuck in my project designing Game Menu in unity. I am using NGUI plugin free version. I created image button and animated in animation view. It made animationclip and added in animator ...
0
votes
0answers
36 views

Flickering Textures

I have downloaded an FBX and its textures and imported them into my project. The problem I have is that the textures are flickering very much in my current scene whenever I move the mouse. I have ...
0
votes
0answers
28 views

Dynamically destroy objects when player enters a boxcollider2D

What would be the best approach for destroying dynamically objects when player enters a boxcollider2D? Currently using parent objects with boxcollider2d to activate OnTriggerEnter2D, boxcollider2d is ...
-1
votes
0answers
53 views

Can anyone explain that code? [on hold]

public class Player : MonoBehaviour { public float speed =10f; public Vector2 maxVelocity = new Vector2(3, 5); void Update () { var forceX = 0f; var forceY = 0f; var absVelX = ...
0
votes
0answers
15 views

Can I break the UI MASK hierarchy in unity 4.6?

I'm using unity 4.6. I saw a couple of UI masks tutorials and saw that there's a certain hierarchy I can't seem to break: -Canvas --- Panel (holds the mask component) --------Image I want to move ...
0
votes
1answer
34 views

Need help in tracking down memory leak in Unity standalone game

I'm experiencing a memory leak in my Unity game. If the game sits idly (no new game objects are being created in the scene), Windows Task Manager will show the memory of the .exe slowly rising. I've ...
0
votes
1answer
48 views

Unity, Cannot change a single Vector2 element of mesh.uv?

I have a simple procedurally generated mesh, with uvs that tile correctly for(int i=1; i<vertices; i++) { uv[i] = new Vector2(x,z); //pseudocode } mesh.uv = uv; This works fine. However if ...
0
votes
2answers
40 views

GUI Text counter Skips numbers after a few seconds

The counter counts perfectly up until the first bump. After this it starts to add about 4-5 "points" instead of just 1. using UnityEngine; using System.Collections; public class GameController : ...
0
votes
1answer
33 views

I am trying to implement a falling animation to my game and i am having alot of problems doing so

i am trying to have it so that when my character isnt touching anything he plays an animation of falling, yet when he moves from one game object to different one, he plays the animation. for example ...
0
votes
1answer
32 views

Change one prefab without changing all prefabs

I have this code that will spawn in a lot of prefabs. It then edits the prefabs. The problem is that every time it changes a prefab it will reset and move all the other ones. Can you please explain ...
0
votes
0answers
73 views

Best way to develop a Web based RPG game - after some research [on hold]

I've been researching this for a while, and I'm in need of some pointers(:D) the thing is this - I have 3 options in mind: HTML5 + Javascript Java applets(is that still a thing?) unity web player ...
0
votes
0answers
59 views

Problem with Visual Studio 2013 Community [on hold]

Im tearing my hair out with this one Im afraid and am down hours and hours. Firstly I wanted to install VS Community to use with Unity. Im running windows 8.1 pro. But I had trouble installing. Long ...
1
vote
2answers
47 views

When are Unity scripts actually disabled?

When I disable an active script in unity, will it be disabled then and there, or will it only be disabled at the end of the frame? For example, if I disable a certain script from within a ...
2
votes
1answer
57 views

How should a Unity object control it's state?

I've been using Unity's component based design, and the biggest problem I've faced is how to control an object's( not component's ) state. The problem is, some components must act differently based ...
0
votes
0answers
25 views

Update DirectX 11 Texture Created in Unity Asynchronously in the Native (c++) Plugin

Sorry for the long question :D tl;dr version :) Is it possible to update DirectX 11 textures created in Unity asynchronously in a native plugin (C++)? I've written a plugin that retrieves data from ...
0
votes
1answer
45 views

What is the correct way to authenticate a player with password from Unity to a php api server?

So, I have a game in Unity for mobiles that gives you the possibility to sign-up with username, email and password to unlock extra features. The datas are sent, through a POST request, to a PHP+MYSQL ...
0
votes
2answers
34 views

StartCoroutine function inside TriggerOnEnter2D not working - unity + kinect

So i'm using Kinect with unity to track user's hand movements, and let the user's hand act as a mouse, I have written the code to detect a collision between a button (sprite object) and the hand ...
1
vote
2answers
85 views

Framerate dependent movement

I'm moving my character controller using Euler integration like this: Vector3 originalPos = transform.position; Vector3 acceleration = Physics.gravity; velocity += acceleration * Time.deltaTime; ...
-1
votes
0answers
25 views

libgdx or unity for 2d game running on smartphones [on hold]

I'd like to make a 2d game such as an arcade game like pac man who will be running on ios, android, blackberry and windows phone devices. To do this, I need a game engine, but I'm puzzled between two ...
0
votes
1answer
55 views

2d sprite circular hit reaction at point

I'm currently attempting to implement a shield reaction to a projectile and am at a loss of how best to implement it. Currently the colliders are mapped to the outline of the animated sprite on all ...
0
votes
0answers
21 views

Connecting lines from edge to edge of a gameObject Unity

I am trying to get the world position of a gameObject edge so to connect one edge to another edge with a lineRenderer component just like shown in the image below. I ran this script I found online to ...
0
votes
1answer
26 views

Editing the components of an instantiated prefab

Is it possible to edit one or more components of an instantiated prefab ? For example if you instantiated five cube prefabs. Is it possible to reference each of the cube prefab and change a value ...
-1
votes
1answer
16 views

Sound plays several times upon collision

Upon collision, my sound effect plays several times. How can I fix this? public Sprite charAlive, charDead; public AudioClip popAudio; void OnCollisionEnter2D (Collision2D col ){ if ...
0
votes
1answer
33 views

Mecanim animation with displacement and physics (isKinematic)

I have my game 3D wolf models from animator with displacement i.e wolf transform with animation (not in-place). I have added rigid body on models. I am facing following issues while executing them in ...
0
votes
0answers
24 views

Resize gameObject when it has extended a restricted area

So here i have an image will provide a better understanding of my problem. So currently i have some white blocks and within the white blocks i have some cyan bordered boxes. So the current problem i ...
0
votes
1answer
55 views

Marching cubes leaving holes in the mesh

Hi I'm trying to reproduce GPU Gems 3 chapter 1 (Generating Complex Procedural Terrains Using the GPU) and so far I managed the basics... Now I'm betting some strange output. I started with the ...
-1
votes
4answers
114 views

Scripting vs Programming [on hold]

How does using Scripting and calling functions of scripting API differ from programming using C++ in UDK or Unity?in scripting we use the scripting API to interact with the engine and use functions ...
0
votes
1answer
24 views

NGUI Texture Background Font of Sprite

I am new to Game Development and using NGUI plugin free version. There are few sprite images in my game. I made them prefab and instantiated at runtime. then I created NGUI Texture and Made it ...
0
votes
0answers
15 views

iTween.LookTo works only when the boolean gets changed

im trying to rotate an object when the player gets too close to it but it only rotates when the player leaves leaves the range for 0.5 seconds or less. It does the same if i use ontriggerenter and ...
0
votes
0answers
47 views

Random Object in Array

I am using Unity3d. I am stuck in my game. I Couldn't find the solution yet. I have created 8 different types of objects, stored in array, . i displayed them on the scene randomly in grid pattern. ...
0
votes
0answers
49 views

Load character instead of load level

I have some trouble finding out how I can load my character at the start of the level, instead of resetting the whole thing. The game mechanics are quite straight forward; don't touch the walls. If ...
0
votes
1answer
19 views

How can I Separate model parts when I click on it

Here I am using a heart model, in dis model I want to identify each part .Under the model Iam having 3 part(Sub1,Sub2,sub3)When I click on the each part how to separate or differentiate it by using ...
0
votes
1answer
28 views

Scaling a UI bar for progress in Unity

I have created a progress bar inside Unity for one of my energy systems. The bar progression works fine. Its just a plane pivoted on one of the faces so scaling it in x axis makes it progress further ...
2
votes
4answers
111 views

.fnt font file offset issues in Unity

I want to display 2D text in Unity using bitmap fonts (.fnt files). There are some solutions out there, but I'm writing my own. Each character is a game object with a SpriteRenderer. It works. ...
0
votes
0answers
29 views

Improving graphics quality with Unity [closed]

So we are using a projection system on a hemispherical dome shown in the image Yes we built this Dome from scratch and its going to be a touch interactive dome :) We are in development stage for ...
0
votes
0answers
16 views

Does Unity's “Compression quality” affect ETC2 compression?

In Unity I am using "Advanced" texture options on Android with ETC2 8-bit compression. There is an option for "Compression quality" as described here: ...
0
votes
2answers
95 views

How can I optimize the size of my .apk?

I noticed that the Flappy Bird .apk is only around 900 KB. I'd like to know how I can achieve a similar optimization in .apk file size for my own games, which use Unity. A small single-scene game ...
1
vote
2answers
98 views

How do I choose an optimal texture size for a mobile Unity game?

I am developing a 2D game with Unity2D for Android, iOS, WebPlayer and maybe for desktop computers. I think the working resolution of my game is 1280*800. How do I choose the optimal size of ...
0
votes
1answer
50 views

Lookrotation of a gameObject in just one axis

So I am trying to orient a gameObject ( house in the picture below) which is nothing but a plane and has a 2d texture on it as you see below. The whole game is made on a hex sphere. I am using ...
0
votes
0answers
15 views

Argument is not enumerable (does not implement System.Collections.IEnumerable). - Change the time scale for a single object [closed]

im trying to make it so the time scales for all objects apart from a specific one, here is my script so far(the part where it decides on which object to ignore the time scale change). function Update ...
0
votes
0answers
11 views

Integrate MoPub native ads in unity

I want to add MoPub native ads in one of my unity project.So,is there any way to achieve this.Cause I found that it works with web and Android or iOS native apps. Is there any way around to make it ...
0
votes
2answers
62 views

Touch sides of tablet, moves that direction

I am making a game where the player flies a balloon through a cavelike structure. I am having trouble making him fly correctly when I try it out on my android tablet, seeing as it requires ...
5
votes
2answers
213 views

Achieving 1 pixel outline around sprites which changes colour depending on the background?

Here's an example of what I mean: In this gif, when the character is on the dark background, his outline is almost black, whilst it retains more colour if the background he's on is the sky one. ...
0
votes
2answers
89 views

Accessing DualShock 4 motion sensor in Windows (ideally Unity)

I'm trying to use a DualShock 4's IMU as a motion controller in Unity, under Windows 7. So far I've tried: DS4Windows (1.5.11): reads motion sensor data, but does not expose them to Unity as axes ...
0
votes
0answers
35 views

Unity directional light for a day night cycle on a hex sphere

So I am trying to create a Day Night cycle on a sphere but it doesn't work the way I want it to. As the model is hex tiled, you see the edges of the hex tiles also lit up like below. I am using a ...
0
votes
2answers
72 views

Movement nudge instead of constant

I am making a small game where the player is constantly moving upwards, and I am having slight problems with the movement to the sides. The script located under works quite perfectly in itself, but my ...
2
votes
1answer
85 views

Get object length and width divided by two?

I have googled and found a script for the following task; Make the camera move to touched position. However, this script will jump to x and y positions on an object, while i would like for it to move ...
-1
votes
1answer
84 views

Unity 3D: Raycasting for gun hits

I am having trouble understanding raycast hits in Unity3D. I am trying to create an FPS game, so I have a gun, bullets and so on. My script for the bullets is: var Bullet : Transform; var Spawn ...