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)

3
votes
0answers
167 views

Unity - reconstruct position from depth

I am using Unity and I want to reconstruct position from depth and frustum corners in pixel shader. I am doing this: In my App, I calculate view-space corners of the far frustum plane and pass them ...
3
votes
2answers
243 views

How to organize level blocks in an Infinite runner

I'm working on an Infinite Runner game. I have created many level blocks(sections) with different obstacles and pick-ups for the player. They are positioned and placed manually, in such a way, to give ...
1
vote
1answer
389 views

How to share image in persistentDataPath to facebook feed?

I'm trying to share an image taking from CaptureScreenshot() using FB.ShareLink(...) to Facebook. My code is the following: (After calling FB.Init(), etc..) string tmpScreenshotPathname = "file:///"...
4
votes
1answer
152 views

AI using character controller makes unwanted change to it's y position

The enemy parent object does not have any colliders except for the character controller. It starts out with y = .57 and immediately jumps to y=1.6355 because of my call to CharacterController.Move(.) ...
1
vote
0answers
42 views

Having trouble making game time pause and unpause

I've been trying to make it where when the player does a certain task, the game's time will pause. When the player does another action, the game's time would unpause and continue. I had my code like ...
1
vote
1answer
63 views

How to show specific item in question on trigger entry? (Unity & c#)

So I have multiple, random objects on a plane, and when my player walks into them, I want them to be 'picked up'. The player can only hold one object at a time, and needs to return the item to the ...
0
votes
1answer
32 views

Activate and Deactivate Collider with Click

i'm having some troubles working with this, it's basically a Sword that points towards your mouse position, and when you Left-Click, a Trigger Collider is activated and then deactivated, but i can't ...
1
vote
2answers
62 views

What's a simple way to send statistics from my game back to me?

For example, I set up my game to keep track of how many times people play x, y, and z game modes, and also to keep track of how often players reach a certain point. What's a simple way to send this ...
0
votes
2answers
108 views

Reading XML working in my computer but not in my Android phone

Following code works perfect in my computer but when I try to run it in my Android Phone, it does not work. string path = @"Assets\Layout\XML\file" + select.ToString() + @".xml"; XmlSerializer ...
1
vote
0answers
34 views

Make Object Turn To Face a Certain Angle

I have an object that is sometimes above or below another object. Once the object comes in close proximity with the other object, I want the object that is above or below that current object, rotate ...
0
votes
0answers
52 views

How to activate user input modules with platform defines in unity?

I'm having some trouble understanding the activation process with input modules. I'm making a game that can work on mobile or on Desktop in VR. Basically, it works by creating a world-space canvas ...
3
votes
1answer
140 views

Proper way to draw 1000 billboards that always face the camera

I have up to 1000 visible GameObjects with trivial plane meshes, which are essentially sprites/billboards and which should always face in the relative direction -camera.forward. There are so many ...
0
votes
2answers
52 views

Why is my gravity script repelling and not attracting?

I'm currently working on a small simulation of Newton's Law of Gravitation in Unity3d, and it seems to be working pretty well, except, it's doing the opposite of what I expected. Instead of attracting ...
2
votes
1answer
249 views

Unity Controller navigating UI

I want players to be able to use a controller to navigate our game's menus. We use Unity's new UI, and in the EventSystem have specified a controller axis for our vertical axis. However the selection ...
4
votes
1answer
142 views

Is there a way to determine Android physical screen size?

We're currently porting our games to Android, and would like to be able to release a universal build for tablets and phones. Is there a way to determine the actual screen size or DPI in order to ...
0
votes
0answers
60 views

Unity 5: Occlusion Culling Areas in Vehicles

I am using Unity 5 and want to make use of Occlusion areas. They work as expected in an FPS-style game. In the current scene I use a rail-shooter-like approach with the camera attached to a (very high ...
0
votes
1answer
47 views

Doesn't Unity5 support Expression Bodied Properties?

I wrote the following line in Unity5 using C#: private static float Width => 0.015f; Unity complained about the following issue: Unexpected symbol `=>' in class, struct, or interface member ...
0
votes
1answer
95 views

Unity3D Making timescale freeze and resume

So, I'm trying to make it where when a popup(Ui panel and text) appears, the game's time(timescale) would freeze. Then when the user enters input and clicks enter button, the popup would disappear ...
0
votes
0answers
75 views

Unity MecAnim Bone Structure

I am trying to modify the bone movements in LateUpdate similar to the following pseudo-method: void LateUpdate() { updateLimb(Transform[] pose, Transform[] model); } Essentially, I want to ...
0
votes
1answer
167 views

Blender FBX exports to Unity3D have incomplete animation sequences

Using Blender, I have rigged and animated this model with this attack action. I exported this model to an FBX format and imported the said FBX file into my Unity3D project. However, when I imported ...
0
votes
0answers
60 views

Is it possible to emit particles from a part of a mesh?

In Unity it's possible to emit particles from a Mesh using the legacy particle system. However: Is it possible to emit particles from only a part of a mesh, for instance to emit particles only from ...
0
votes
0answers
167 views

How to export unity project to play in HTC Vive?

I have an Unity project which I want to export and use in HTC Vive. How do I do that and in addition is there any resource online which I can use to refer how do I code to use the controllers for HTC ...
1
vote
1answer
120 views

Why does my Unity animator state “finish” before the visible motion does?

Example: Screenshot of the TopAppearing motion - boost the alpha of the sprite from 0 to 1 for total of 2 seconds. Screenshot after TopAppearing state has been finished Screenshot of the ...
-1
votes
1answer
168 views

Fade in and fade out Gui texture [closed]

i am beginner in c# that i want have fade-in and fade-out. i write script but why didn't work: using UnityEngine; using System.Collections; public class FADE : MonoBehaviour { private var alpha =...
-1
votes
1answer
82 views

How to avoid mouse click over the trigger object?

I'm detecting the mouse clicks if the click is happened over the collider but i dont't want to fire mouse click if it is on the trigger object. How to i do this. Anyone give me a suggestion. Thank ...
1
vote
0answers
52 views

Is Mogre (essentially Ogre, but C#) dead? If so what would be a viable alternative to it? [closed]

I've been looking around for a 3D engine where I can use C# to replace Unity lately, but haven't really come up with much. Ogre looked promising, but it wasn't C# however Mogre is. Sadly looks like it ...
1
vote
1answer
182 views

Unity3D RigidBody adding force diagonally (x,y,0) results in two separate movements instead of one diagonal movement?

The intentions of this function are to utilize the RigidBody component from a "target" object and clear its force while applying a diagonal force in the direction upwards and away from the side they ...
1
vote
1answer
246 views

How to use .fbx for 2D animation in unity 2D

I am new to unity so please bear with me. I have come to know that for animations it is better to fbx format in unity rather than sprite sheets. I am using unity 5.2 and till now i created all my ...
1
vote
1answer
97 views

Unity3D Sprite tearing on Android Smartphone

The game was running on Samsung Galaxy Trend 2. On other smaptphones and emulator it seems running properly without glitches. Sprites import settings are following: Could someone explain why ...
3
votes
1answer
78 views

How can I use shaders in Unity to write a scientific computing program?

I want to write a GPU shallow water code on Unity3D. For sure, performance matters a lot. I've done this before using DirectX and C++. But for a couple of reasons I want to redo it in Unity3D. I ...
2
votes
1answer
169 views

Attach to a GameObject after collision? [duplicate]

How can I make a GameObject attach (or "stick") to another GameObject after collision? The problem: I want the GameObject to attach after collision even if it changes scale. What I have tried: ...
0
votes
1answer
488 views

How to animate child from parent in the Animation view?

For some reason I can't change the value of the scale properties. The scale properties belong to a child object, and I added them with "add Property". What I'm trying to do is, adding an Animation ...
1
vote
1answer
108 views

Duplicate a Prefab as a separate asset in Unity 5.2 [duplicate]

I have a Asset which is a collectable object [Pickup] and I currently have eight in my scene, I'd like to duplicate this asset and use it to harm the player [Bad Pickup]. I decided to duplicate the ...
1
vote
1answer
65 views

Screen transition effect like subway surfers

I would like to know how can I achieve this kind of screen transition effect ? The effect is screen independent. https://www.youtube.com/watch?v=Muh7QFisCfE#t=01m57s
0
votes
2answers
75 views

the half of the screen does not seem to work correctly

I am not such a professional coder but trying to code something on Unity. However, when I try to play the application in my android phone, the half of the screen does not seem to work correctly: ...
0
votes
2answers
205 views

How to handle multiple enemies with the same script?

i'm working on a basic Top-Down Shooter, kind of like... Nuclear Throne or The Binding of Isaac, but since i'm new to Unity, and it's something i'm required to do for school, i'm quite in a rush so i ...
1
vote
1answer
71 views

Prevent character's animation from causing its mesh to interpenetrate itself

I'm making a game with a pretty large group of people that respond to things the user does. They all have the same animator attached, but the animations that play differ using a script with a ...
1
vote
1answer
178 views

How to deal with inconsistent network delay caused by packets arriving at different times in the frame?

I'm developing a multiplayer game that does not have prediction. It implements client-side interpolation. The problem with this is that input delay can be perceived. I've measured the various times ...
2
votes
3answers
83 views

Unity - hierachy organisational methadology

I'm just getting into unity, so I do not know if this system of organisation will have any negative consequences. I intend to store my project files and assets under an assets directory then into ...
3
votes
1answer
595 views

Triggering animation in character OnTriggerEnter?

I've been stuck on this for hours. I have a character whose animations are based in mecanim to transition based on the bool variable ShivaEnter. One invisible cube is set to change the bool value ...
-2
votes
1answer
223 views

Add them as submodules from Git Shell or remove their .git folders. I tried the latter, but don't know to do the former. How do I do that? [closed]

I'm trying to set up version control for my group, but I'm having trouble getting GitHub to work (I'm brand new to it, and version control in general). It keeps saying "Could not commit sub-modules: [...
-3
votes
2answers
121 views

Smooth GameObject Rotation

I want to rotate a 3D GameObject from 0 degrees to 180 degrees on the Z axis smoothly at a speed that I can define. How can I do this?
3
votes
2answers
170 views

How to avoid Walls in A*

Well I had a problem with the implementation of my A* algorithm in C# for unity, and I don't realize how to prevent the diagonal movement and the cross walls, I had the next code, the print line's are ...
2
votes
1answer
325 views

Unity Profiler - What would cause PlayerEndOfFrame to have 10-16MB in GC Alloc?

I can't find much documentation on what "PlayerEndOfFrame" does. Sure it is the end of a frame but what would cause the GC Alloc to go so high? This is the profiler results from a debug build on a ...
2
votes
1answer
140 views

Why doesn't Array.Copy to mesh.verticies work in Unity?

I am rebuilding a mesh but something seems odd that I have to create a temp array just to hold the verticies rather than copy an array. I'm not using list because this is used frequently and I do not ...
2
votes
1answer
65 views

Refill lives after application exit

I try to implement refilling lives functionality after exit application. Every live is refilling after 25 minutes, but unfortunately only if the user is in the game. Here is the sample code: private ...
2
votes
1answer
44 views

Finding vector from a vertex to a plane

I am trying to implement Dual Contouring, following serveral sources, mainly http://www.sandboxie.com/misc/isosurf/isosurfaces.html but now I want to implement finding the feature point as explained ...
2
votes
2answers
3k views

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details

I get following error while building to Android with Unty 5.2.2f1 (with a new&clean project). Notes: I use GPGS 0.9.27 and Soomla Core 1.2.1 and Profile 2.2.1 and maximum supported Facebook ...
0
votes
2answers
394 views

Using Unity's `transform.translate()` to translate relative to an object but only using two axis

I'm using transform.translate() to move an object around the world space, relative to the camera that is following it. The camera has an angle of 23 degrees on the X axis. The problem is that when I ...
-2
votes
2answers
77 views

Increase Y position on MouseButtonDown?

How can I increase the altitude of a GameObject as long as if (Input.GetMouseButtonDown(0)) is activated? "The longer the button is pressed the higher the GameObject goes." I also want to show the ...