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
28 views
+50

How to programmatically change sprite sheet sub-sprite name

I am trying to change the name of the sub-sprites of a sprite sheet. I have searched and tried everything I can think of and cannot get it to work, which makes me think it can't be done at this point ...
1
vote
3answers
3k views

Collider2D and Rigidbody2D, how do they work?

I have been learning JavaScript and Unity for a week now. I learned how to make Cube as a Ground and another Cube as a player and I used this code to make the Player Cube move forward and backward and ...
0
votes
0answers
6 views

GetTouch(0) and GetTouch(1) are interchanging in unity

Guys I have created a TouchJoystick.cs but I have a problem in it. When I tap and hold on left side of the screen it says GetTouch(0) is in left side…ok so far so good, but when I simultaneously tap ...
1
vote
1answer
211 views

How do I Rigidbody.AddForce(Vector3) in Unreal Engine?

I am coming from the Unity Engine, and trying to get my feet wet with Unreal Engine 4. I want to add a one-time force to an object. To accomplish this in Unity 5, I would use: void Start(){ ...
0
votes
1answer
25 views

Unable to Set Text of another Text Object

The Idea: Pressing a button in the canvas will allow the player to select a race. A script is attached to an object which is accessed though the OnClick() function of the button. The script is ...
-1
votes
1answer
21 views

How to create an android mobile controller for a game in pc using unity?

Basically i need the android device to send touch inputs to the pc. I have searched extensively but can't any relevant articles to do so. Please help me !
0
votes
0answers
19 views
+150

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

Player rotation issues (Player returns to default forward rotation after releasing keys)

So basically what is happening is that my player rotates and faces the direction that he is currently being steered toward (which is wonderful). But after I release, let's say the A key, meaning he is ...
1
vote
1answer
19 views

How to create scrolling input text field using Unity UI

How to create scrolling input textfield using UI in Unity 4.6.6 problems in my project are 1.Cursor is not masking 2.Scrollbar size is automatically become 0 to 1 size 3.Scrollbar is not working ...
1
vote
2answers
55 views

Deleting fewest Navmesh Obstacles when no valid path is found

So I'm building a Tower Defence, with mazing (i.e. the player can place towers to make the mobs take a longer route to there destination.) I'm using Unity's Navmesh system. Each Enemy unit has a ...
0
votes
1answer
43 views

Enemy AI with Rigidbody - Floating in the air

I'm working on my enemy AI scripts and I'm using a rigidbody to have the enemies chase the player when the player gets into its aggro distance. Two of the main problems I'm having: When the game ...
0
votes
1answer
191 views

Unity5 TextAsset not functioning in WebPlayer

Preface I am working on a 2D Platformer in Unity5 utilizing TileMap techniques. I have a working system to read "Room Tile Data" from JSON files with the Unity TextAsset Class and the Newtonsoft ...
4
votes
2answers
1k views

Getting a pixel of Sprite at the cursor position in Unity

Summary: I've been trying to figure out a way to use simple box colliders as a nice and efficient "first pass" collider. For the "second pass", I want to check that the area clicked has an alpha value ...
0
votes
1answer
39 views

move sprite relative to position on another sprite (sword and player)

I'm sure this is a common problem people face but I can't find much on this topic after some googling. I have a sword, and a player, both which are sprites. I want the sword to be attached to the ...
0
votes
1answer
30 views

Algorithm to fill a shape defined by 4 pixel points?

I'm developing an application in Unity3D where a user can define 4 pixel points on screen, and what I would like to do is fill this shape with pixels using Unity's SetPixel. While I can do this ...
0
votes
1answer
69 views

Unity and Chartboost loading problems

I implemented chartboost in my ios game and locally it wors great. I can receive ads. Now my game is online but in the google analytics I get only error messages from the game, meaning the ...
1
vote
1answer
932 views

How would I find the SDK folder for Android Studio so I can build my Unity project?

So I've been trying to build my unity project for android, but my problem is that I don't know how to find the Android SDK. I have the old developer bundle installed, when it was still the one with ...
6
votes
2answers
4k views

Unity: how to apply programmatical changes to the Terrain SplatPrototype?

I have a script to which I add a Terrain object (I drag and drop the terrain in the public Terrain field). The Terrain is already setup in Unity to have 2 PaintTextures: 1 is a Square (set up with a ...
0
votes
3answers
171 views

Detecting on which side did the objects collided unity 2d

I have a ball and a rectangle in my game. The rectangle has a box collider 2d attached to it. How can I calculate or check when the ball hits the top of my collider, when it hits the bottom, left and ...
0
votes
2answers
43 views

Stencil based mask with alpha

I'm trying to create a fog effect like civ 5: I tried creating a StencilSet shader that receives a mask and sets the stencil buffer to 1. I would render the following on every unexplored tile using ...
0
votes
4answers
59 views

How to add tiles randomly?

I made a set of 10 different "ocean" tiles, all interchangeable with one another, and I'd like to randomly attach these 10 different tiles together in different combinations over a large rectangular ...
-1
votes
0answers
22 views

Unity 2D topdown car physics - backward movement

Im trying to implement some movement physics to my car in unity 2D. Im trying to achieve this behavior : if press up - car move forward. if i press down and car is moving - brake deceleration. if ...
0
votes
1answer
1k 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 ...
-1
votes
1answer
27 views

Unity Ui slider volume control

I have the ui slider to control my volume, I have my slider to control all the volume of the game. I have make it so when the main slider change value all the other slider change with it but when I ...
0
votes
1answer
194 views

Finding a moving target in a maze

I'm making a game that is a bit of a mix of snake and pacman. Basically, two players go through the maze and each time they pick up a piece of candy, a cube is added to their tail. If one player ...
0
votes
1answer
294 views

Voxel (Marching Cubes) Terrain Creation / Terrain Editing

im working on a voxel based game in unity. the terrain(sphere-->planet) should be out of voxels and at first i built a minecraft like voxel plugin for unity. this means that i had a sphere out of ...
2
votes
1answer
108 views

TopDown Island Generation

I am trying to generate an island using Simplex Noise. To actually make a island shape i used Amitp's answers to the following questions: 1.Fast, simple procedural 2d island generation 2.Generating ...
0
votes
0answers
17 views

Resizable textured windows

I want to have display a window with a textured background, but the window should be resizable. How would you recommend going about this? Using a 9-sliced image for the background will not work ...
0
votes
1answer
159 views

FPS using mouse to move rather than keys

Hi I am developing a First person game but would like to use the mouse to move on a click to move as opposed to the keys. I also need to disable Y movement and restrict the x movement to 180. What ...
1
vote
1answer
93 views

Get mouse/touch position for NGUI event

Since I am using NGUI, to capture mouse events I use their methods such as void OnPress (bool isDown) { } How can I check the mouse/touch position that corresponds to this particular OnPress ...
0
votes
0answers
16 views

Unity3d iOS build restarts when regaining focus from browser

I have an app made in Unity3d for android and iOS. In it, the user has the ability to link their accounts with Facebook and Twitter. For Facebook I use their Unity plugin, for Twitter, I open an ...
0
votes
0answers
15 views

CreateDelegate need some highlights

I'm trying to understand how to properly use Delegates in c# with Unity3d. What I'm trying to achieve is to dynamically create on Start a list containing all the methods contained in the class so ...
0
votes
1answer
40 views

Moving from HeroEngine to Unity/Torque 3D

Short background: small team with some financial back-up from investors, yet no multi-billion-$ enterprise, working on an MMORPG for PC. HeroEngine looks like the perfect solution. Everything ...
0
votes
1answer
41 views

Unity: Restrict movement inside a gameobject (2D)

I've been sort of trying my own thing but it's super buggy so I'd like to see what other people have done to create moveable spaces. In essence, I just want to restrict my character's movement to ...
0
votes
0answers
40 views

The purpose of having a game manager [on hold]

I understand a game manager is meant to keep track of certain things in the game but can't seem to find a more in-depth explanation about what the game manager is suppose to do and what is its ...
0
votes
1answer
68 views

Align SpriteText position

i have this function which aligns text. static function AlignTxt(obj : GameObject, txtAnchor : SpriteText.Anchor_Pos, txtAlign : SpriteText.Alignment_Type) { ...
0
votes
1answer
24 views

pivot of a 3d model outside its mesh after importing into Unity3d

as you can see, the pivot is outside my mesh. I want to use the pivot for rotating around, for that I need to set the pivot to the real "rotating point". I know that there's the SetPivot script, but ...
-2
votes
1answer
5k views

How can i export unity games to android?

I'm using unity 4.0. I want to build games for android. When I click build it opens a select folder dialog box and wants an apk name. But after pressing select it does nothing. Simply the dialog box ...
0
votes
1answer
98 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 ...
-1
votes
1answer
94 views

Using Physics.Raycast inside OnCollisionEnter2D function

void OnCollisionEnter2D(Collision2D collision) { foreach(ContactPoint2D contact in collision.contacts) { RaycastHit raycastInfo; ...
0
votes
1answer
62 views

How to create a state based traffic signal?

I want to create a traffic light for a Unity3D game. I will model it in blender. What is the best way to control this light in a unity scene? One way I could think of is to change texture of say ...
0
votes
1answer
173 views

How to bounce the player away after attack by enemies?

I creating a 2d platform game. I would like to bounce the player away after hit by the enemy, so the user get another feedback beside the sound effect. How can I achieve my wish? Use the following ...
-4
votes
0answers
76 views

Unity - C# How to create very Big Number?

public static float a = 9999999999999999999; This is the biggest variable that can create. but is not enough for me I need to get to this public static float a = ...
1
vote
0answers
10 views

In Unity, Meta Files are Tracked but Behaviours Fall Off

My team is working on a Unity game, and we are using a mercurial repository on BitBucket. Whenever we update, all of the behaviours 'fall off' of state machines, behaviours, etc. When searching for a ...
0
votes
2answers
276 views

How to iterate through the frames of an AnimationClip in editor mode

I'm working on a 2D game, using spritesheets as the basis for four AnimationClips. (Every frame from the spritesheet is a keyframe in the animation.) I'm trying to step through the frames of these ...
0
votes
2answers
78 views

Is it possible to load local html pages into unity?

Is it possible to open a HTML page inside UNITY, with the page functioning normally?
0
votes
1answer
49 views

Unity Xcode Post Build Change Language Dialect

Is it possible to change the C++ Language Dialect setting under Apple LLVM 6.1 - Language - C++ during a post build process in Unity3D? See here: I'm using XCodeEditor, and in the json, i tried these ...
0
votes
1answer
89 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
0answers
38 views

Looking for 2D engine in Linux environment for top down style game [on hold]

I'd like to start getting into game development and wanted to know what tools/engines would best fit me. I am working in a Linux environment and my programming background is C/C++/Java and some Perl. ...
5
votes
2answers
6k views

Is it possible to use C++ with Unity instead of C#?

The title kind of says it all. Is it possible to replace C# with C++ on a game using Unity?