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 (2)

1
vote
1answer
70 views

Put a coroutine on potentially infinite loop

I have several coroutines always running. I want to put these coroutines on hold as I set the game to pause mode. Consider the content of these coroutines as follows while (timeleft > 0) ...
3
votes
1answer
125 views

Why flip sprites instead of creating extra assets?

Why is the preferred method for changing the direction a character is looking in a 2D game a sprite flip? Why not just create the extra asset and show that one on screen?
1
vote
2answers
115 views

Pausing the game

I've had a look around and kept finding about using Time.TimeScale = 0 to pause the game, although this is the normal way to do it, it is not exactly what im looking for. When my menu button is ...
0
votes
2answers
123 views

How can I prevent 2D teleportation from teleporting through solid objects?

In my 2D game, the player is able to teleport to any place on the screen with the click of the mouse button. What I am trying to prevent is the ability to teleport across solid objects. If the point ...
1
vote
1answer
11k views

Create fog (smoke) on Unity3D?

I'm creating a game where you are inside a boiler room, the problem is I want to create the fog (smoke) to make this more realistic.
1
vote
2answers
52 views

How do you freeze your cursor in Unity?

In a typical MMORPG, when I hold down the right click button and drag, the cursor disappears and stays in the same position. How does one do that?
-2
votes
2answers
233 views

How solve 400 Bad Request error in unity? [closed]

400 Bad Request UnityEngine.Debug:Log(Object) FBScript:DisplayUserName(IResult) (at Assets/Script/FBScript.cs:63) Facebook.Unity.c__Iterator1:MoveNext() (at Assets/FacebookSDK/SDK/Scripts/Utils/...
0
votes
1answer
114 views

Importing .anim files created using the Unity Animation controls

Our artist created some .anim files using the built-in Unity Mecanim system (where you use keyframes and drag various body parts to construct the animation). However, now we're trying to export them ...
0
votes
0answers
72 views

Unity Networking dedicated server hosting multiple game instances

I am making a multiplayer game on Unity that uses a dedicated server for the networking needs. From what I found a dedicated server is simply you Unity game compiled headless which only allows one ...
-1
votes
1answer
45 views

Detect the position of the mouse press? [closed]

I am encountering an extremely absurd phenomenon. When I run this code on my smartphone via Unity Remote or even on the computer, it works as expected. But when I install the APK on the device and run ...
1
vote
2answers
81 views

Unable to move GameObject?

This simulates a GameObject swinging between two positions. I am unable to manually move a GameObject on the Y axis using the Unity editor (in scene view) when the following script is attached and ...
1
vote
1answer
39 views

How to fix this unexpected movement?

I am facing a problem below is the detail. There are two scripts(actually more than two but these have the problem) Cannon.cs and Launch.cs and three buttons(up, down, and launch) to move cannon and ...
3
votes
1answer
142 views

Can unity playerprefs fail to save, and if they do how can I check?

As the title says I would like to know if playerprefs can fail to save. If they can, is there some way to check if it save properly / if it failed? Example : if (playerprefsFailed) { Debug....
1
vote
1answer
102 views

Unity sidescroller with 3D objects/environment. Should I create a 2D or 3D project?

I'm looking to make a side-scroller in which the camera and all objects can only move in the x and y directions. However, I'm going to have all objects and environments as actual 3D models. Is it ...
0
votes
0answers
40 views

Preventing a NavMesh agent from moving Diagonally?

I'm currently working on a topdown game that uses 3D models. I am planning on using the NavMesh system in Unity to handle the movement of my NPCs, however, the NavMesh agents move diagonally when ...
0
votes
0answers
46 views

Physics related actions for interfaces of IPointerDownHandler, IPointerUpHandler vs. FixedUpdate in Unity?

I've been reading anything physics related in Unity should be handled in the FixedUpdate() call. Is this also the case when you implement the IPointerDownHandler and IPointerUpHandler interfaces and ...
2
votes
1answer
180 views

How do I “teleport” an object in Unity?

I'm trying to make a script where once a player triggers a collision they are teleported to another position that is determined by a empty game object. I think it has to do something with the ...
1
vote
0answers
33 views

Translate D3DXMatrixLookAtLH to Unity compatible code

I am currently trying to port a really old Game (I have the source of it) to Unity as a fun project. And I'm currently stuck with the object rotation techniques in Unity compared to the ones used in ...
0
votes
0answers
43 views

My Movement Function is working good but called only once

I have a function, It's working but not getting called every frame if It's in canMoveDown function but !canMoveDown its not. if (!canMoveDown && UpdateTilePhysics(currentBoardPiece)) like ...
4
votes
1answer
391 views

Glow shader limited by the texture area

I'm working on a glow shader (for 2D engine Futile relying on Unity). It works OK but the effect is limited by the texture area. Except from adding a lot of empty pixels around the textures (which ...
1
vote
1answer
149 views

Initializing Consumable product to an amount on first use

I am using Unity's In App Purchase plugin to implement an in game store. In my game every player has fuel. I'd like to use the plugin in order to keep track of the amount of fuel the player has so ...
1
vote
0answers
2k views

Unity 2D loading Spritesheet Atlas at runtime from web and using it dynamically

I am new to Unity (came from AS3/Starling) and just started for 2D games in Unity. I have a spritesheet / texture-atlas (many different sized images packed in a single png) which I want to download at ...
0
votes
1answer
35 views

Setting a Boolean as a field of an object from another script

I saw this question asked some times but no one correlates to mine. I see people using the GetComponent() function but this one should work too. First I receive a Bool value from a toggle button and ...
0
votes
1answer
72 views

Combine Unity games in one app

I want to combine multiple Unity games in one Unity app (or other framework if necessary). This app would have a bunch of buttons that will start the desired game. Is this possible and what would be ...
0
votes
1answer
103 views

Can I use JavaScript for Unity 5? [duplicate]

Sorry for my bad English. I wanted to know how similar is JavaScript with Unity Script. I know that Unity Script is not JavaScript and it was done for marketing purposes but I just wanted to know if ...
1
vote
0answers
753 views

How to fix artifacts when using equirectangular 360 panorama photo on sphere

I have a equirectangular 360 panorama photo. I tried to use it as a texture for a default Unity Sphere. The image had artifacts/visible seams, especially near the "poles" of the sphere (north pole and ...
-1
votes
1answer
71 views

Enemy Retargeting

i am trying to make a game using navmesh agent in unity,where the enemies first attack the player and change their target to tanks when player spawns them.then again retarget player after the tank ...
1
vote
2answers
197 views

Player shooting himself when moving - Unity UNET

Setting : Creating my first multiplayer game and running into an odd issue. it's a tank game where players can shoot bullets and kill each other Problem : When the client shoots while moving, the ...
0
votes
1answer
2k views

Camera controller in a 2d platformer

I'm basically bumming around using Unity's 2D creation tools, and I've managed to create a little platformer physics demo. There's a lot of work to be done, but I've got basic movement down, some ...
1
vote
0answers
58 views

How can I reduce the size of bundled Unity DLLs on Android? [duplicate]

I have created a simple project (I am a Unity beginner) for Android but the apk size is around 18 MB! I checked the documentation. One way to decrease the apk size is to check the editor log. Then I ...
12
votes
2answers
8k views

How can I get voice recognition features into the Unity Game Engine? [closed]

How can I get voice recognition features into the Unity Game Engine? Is there a plug-in or a framework (hopefully freeware) that I could use? If so, do you have any ideas on how to install it? Also, ...
0
votes
1answer
35 views

How to find the participation id corresponding to a sender id

I am creating a real time multiplayer game in unity 3d using Google Play Game Services. In my function where I deal with the positioning of players based on information that is sent from other players,...
0
votes
1answer
3k views

Objects spawned on clients only appear locally

I'm trying out the new Unity 5.1 networking for a Bomberman style game and i can't seem to get the bombs to instantiate on both the client and all those connected, what am i missing? The code below ...
0
votes
2answers
117 views

How to fix my tile-based game's tile movement code ? (like a CandyCrush Style)

I'm currently creating a tile-based game like a CandyCrush style direction movement (no problem on only down movement) trying to smooth, not laggy tile movement with a board piece, and I'm writing a ...
3
votes
3answers
859 views

Can I create a Sprite Asset using a downloaded Texture at runtime?

I know that Asset Bundles exist, and I'm already taking a look at them. But I'm still interested in this particular approach: I am interested in downloading a .png image from the Web, and then "...
0
votes
1answer
84 views

Passing strings padded with white space into a byte[]

I am using Google Play services for a real time multiplayer game in Unity 3d. When sending the data in a byte[] in the multiplayer update I have to pad certain entries going into the byte[] with white ...
0
votes
1answer
57 views

Unity: Assign GameObject to Class that hasn't been yet instantiated

I'm creating a game where I have an Entity class that contains basic entity info (pos, health,..) and some functions. Enemies and Player later on inherit from this class. Public class Entity { ...
1
vote
2answers
151 views

Optimization of Cube-based World

I'm currently working on taking an idea I've been toying with in C++ and bringing it into Unity, but I'm struggling to figure out how to make it performant and how to do things the "Unity way". My ...
1
vote
0answers
120 views

How to load new scenes or models from network in unity or unreal engine?

I have a project to be done. I had done some research to accomplish some features. Event so, I couldn't find some answers. The project needs to have some features as follow; Charachter creation in ...
0
votes
0answers
175 views

Unity 5.3 Asynchronous Texture Upload in C#

I want to load textures asynchronous in C#. I heard it that it is possible to do it in Unity 5.3. However documentation doesn't mention how to do it in C#. Does anyone have an idea how it works? ...
0
votes
3answers
232 views

Creating a toggle button in unity3d Scene vs Scripting

I am making my first GUI in unity, and I am not sure if should create the toggle buttons in the game scene by creating new UI elements or by scripting. Creating them in the game scene gives me more ...
0
votes
1answer
51 views

If I save some information with PlayerPrefs, they will remain saved even if the game is online?

If I make a game in unity and I use the PlayerPrefs function to save the progress and load it in another play, that information will be stored even if the game is loaded on an online platform? I mean: ...
2
votes
1answer
61 views

Unity rigidbody exhibits a premature max speed

In effort to build a racing simulator, I have been working on a working model for the pistons in the engine, and have come to a bit of a stand still. I have gone through extensive testing, through ...
0
votes
1answer
133 views

Unity Change Ball Direction after hitting paddle in a Pong game (like in dx-ball)

I'm struggling with how to get the ball to change the bounce based on where it hits on the paddle. Normally in a pong game, the angle changes, depending on how far from center the ball bounces, and ...
2
votes
2answers
80 views

Unity3D: How to convince the user of objects moving closer with layering?

I'm currently developing a Universe Simulator for Android. I had a question regarding layering. I have a list of 100k 3DPoints each represent a stars co-ordinates. I have decided to break the cameras ...
2
votes
2answers
4k views

Position GUI Text in 2D game

I am working on a 2D game, and my camera is a orthographic with a size of 320. I want to display some text, but not with OnGUI(). Rather, with a GUI Text game object. I couldn't help but notice that ...
0
votes
0answers
33 views

How should I go about making hinges two-way, in Unity?

I have a basic rig made up, in Unity. It replicates the way a piston moves, in a car. To simplify it, I have a wheel connected to a cylinder, using the default hinge joint. If I move the wheel, the ...
0
votes
1answer
273 views

How to make my character double jump in unity3d using CharacterController?

I can now control my character in air, I used Unity's CharacterController.Move docs, but now I need to make my character double jump. Here's the code. public class PlayerMovement : MonoBehaviour { ...
0
votes
0answers
114 views

Communication between Photon Cloud game and web server [Unity3D; Photon]

I am creating a multiplayer game using Photon Cloud (Photon Unity Network). For storage of player data (profile, inventory, achievments) I use web server (asp.net mvc & sql server). How to ...
0
votes
0answers
14 views

Rigidbody constrains like to invert themselves

I have been all across the Internet for this particular issue, and have found no evidence of any body else having the same problem, but lately, I have noticed unity exhibiting weird reaction to values ...