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)

4
votes
2answers
158 views

Discoordinated Chromatic Aberration Effect

The game Teleglitch heavily utilizes the CA effect with screen distortion. I am trying to achieve this effect. Issue 1. How to not apply the effect onto the floor? (solved) They render the screen ...
1
vote
1answer
31 views

Aspect ratios for sprites in Unity3d

I'm using Unity3D version 5.0. I'm wondering what the best way to deal with changing resolutions in Unity is. In Swift I can just use the @x2/@x3 in order for it to pick the correct sprite for it ...
0
votes
1answer
53 views

How to make the capsule collider that comes with character controller follow the animations

I'm making a 3D endless running game like subway surf. When I swipe/press down arrow the slide animation starts but the capsule collider isn't following along as it doesn't slides along with the ...
-4
votes
1answer
44 views

How to I Create My own 3d modals in unity5? [closed]

How to I Create My own 3D modals in unity 5? Actually,I don't know how to create a 3d modals in unity 5.If anyone is know, PLZ tell me...!
1
vote
0answers
13 views

File Path conflicts on GitHub with Unity

I am getting file path errors when a contributor is making commitments to GitHub. All of these errors are file path related or extra white space on the same lines. This should be something in the ...
0
votes
3answers
109 views

Health bar - calculating health bar's position from percentage

I'm making a simple health bar in Unity 3D. Health bar UI is made from images. I'm having a problem with setting bar's position based on health percentage. Here's a script part: percentHealth = ...
2
votes
1answer
76 views

Stop Camera up movement

I am developing 3D game , the main camera is child of player. When player jumps camera too gets move up with player as its child of player.Is there anyway to stop this behavior? The only thing I can ...
0
votes
2answers
28 views

Getting unit to complete rotation before moving?

I've been trying to get a unit in my project to move in a fashion similiar to that of modern MOBA games. However, I am faced with the issue of the unit moving before the rotation is completed and the ...
0
votes
1answer
42 views

What is the difference between a game object being disabled and it made inactive?

I am looking over a script that has a particular function called to disable the script and mark a list for re-structuring: void Disable() { gameObject.SetActive(false); isEnumerated = false; ...
0
votes
1answer
23 views

Unable to get object to rotate to looked position?

I'm trying to get an object to smoothly rotate towards a clicked point in my terrain. However, my code only yields jittery movements in the other direction. Any help will be greatly appreciated. ...
0
votes
1answer
47 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
0answers
43 views

I have a script that changes an object to a broken version of itself when clicked, but it keeps rotating the object

So I have made a script in unity that you put on an object and when you click the object it will delete the object and replace it with a broken one I made in blender. My problem is that when I click ...
1
vote
0answers
62 views

Create an atlas texture in photoshop to use in unity

To create a button in NGUI looks like we need to create something called Atlas that is a material that contains a lot of little images called Sprites. I created a set of 40 sprites (for 20 buttons ...
0
votes
0answers
32 views

Mesh tilemap and scrolling

I'm working on a top-down game where the player can move up, down, left, or right. I've come across tilemaps but since using Unity, I'm seeing the idea of using Meshes. I don't quite understand how ...
1
vote
1answer
85 views

How can I mask this CanvasRenderer?

I'm creating a text box that allows for selectable text, based off of Unity's InputField. An issue I am now facing is that the selection highlight does not respond to masks (The parent has a mask, but ...
0
votes
2answers
78 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
1answer
26 views

Getting curved-based zooming speed?

I am able to get a fairly smooth zooming function going on in my project. However I'm hoping to achieve a non-linear function. I've tried using the smoothstep function but it doesn't feel smooth ...
0
votes
0answers
31 views

Question about designing and controlling a forklift's forks

I am building a forklift for a game that I am working and I am trying to come up with a valid way of designing it. So far I haven't really liked the way it behaves in game The forklift has three parts ...
1
vote
1answer
26 views

Update total enemy counter after single enemy is defeated?

So I have a list that counts how many enemies are in the area. But when I kill an enemy, the list shows that that element in that array is missing, and doesn't reduce the enemy counter. How can I get ...
2
votes
1answer
79 views

How do I make an AI that stays at a distance from the player act correctly when cornered?

I am working on a few different AIs for a tile-based game. I'm trying to figure out one where that tries to keep a certain distance from the player. So if distance becomes small, move away. The whole ...
0
votes
4answers
60 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 ...
0
votes
1answer
50 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
2answers
108 views

How do I trigger OnSelect() via the ISelectHandler in my class?

I'm trying to figure out how I can make a custom UI element identify when it has been selected or deselected. Classes such as Selectable inherit from the ISelectHandler and IDeselectHandler and their ...
0
votes
1answer
74 views

[Unity]Making sure playermodel only moves 1 unit

I am doing a school assignment based off of the Unity3D tutorial 2D RogueLike (all code available here) In my version though, the movement is not turnbased and I am having some trouble figuring it ...
1
vote
1answer
57 views

unity3d model falling apart

I found something I can't understand. I'm only a beginner, so I thought I could use the CarController Scripts of the Car Demo for making a little driving game with different models. I wonder why the ...
1
vote
0answers
18 views

How do I get line numbers in a unity headless server's stack trace?

For some reason Unity 5 doesn't allow me to do a developement build of a headless server, and this is quite a problem when debugging, since I get stack traces without line numbers, such as: ...
0
votes
1answer
33 views

Material not changing Unity3d [duplicate]

I have a MeshRenderer mr public variable in script1. I dragged mesh1 from the assets in the mr place in the inspector of script1. mesh1 has a material mat1, I try to change this material to mat2 using ...
0
votes
0answers
12 views

Texture colour not matching sprite?

As per title, I am unable to get my texture to match the colour of the background sprite. How would i go about alleviating this?
2
votes
1answer
39 views

Is it dramatically more efficient to have less BoxCollider2D's (for raycasting/custom physics)?

I have a temporary tile system for my platformer where I simply duplicate the same tiny box sprite with a BoxCollider2Don it over and over again. Like I said this is a temporary procedure for design ...
0
votes
1answer
26 views

Error compiling Unity after porting to mac

I used BitBucket to move my project from a PC to a Mac, now I can't compile in my Mac, as I get the following error: Error building Player: Win32Exception: ...
0
votes
1answer
43 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
2answers
42 views

Can we create same name class for different objects in unity?

I have four similar objects in my game. As they are all similar therefore I have created a single script that defines mash for all of them. The script that defines mash for these objects uses a ...
0
votes
1answer
44 views

Getting position of finger along a screen

I'm trying to get a list of Vector2 position by tracking my finger and then tracing them with a prefab (Basically just gestures). I have appended an onGUI function to help print out the list of ...
0
votes
1answer
107 views

Display and render only a specific object in wireframe in Unity3D

I want to know how to view and render a specific game object (mesh) in wireframe, not the whole scene. I can change the scene to wireframe using GL.wireframe but the problem I want to view and render ...
2
votes
1answer
78 views

What can cause shadow slicing while moving camera?

Can't explain better than with video: https://youtu.be/4nIMIL6w-0M The effect I'm trying to achive is a simple fog of war. See, I have a point light casting shadows on a plane. The plane has a ...
3
votes
1answer
146 views

Fade between scenes

So I have googled how to do this already but all the answers were for older versions of unity and use things that are not applicable anymore. I am trying to do is fade the screen to white when the ...
1
vote
1answer
29 views

Run some objc code very early in unity iOS game lifetime

I want to hook up a crash reporting service to my unity iOS game. It's just one line of objC to add, as early into the app lifecycle as possible, but I'm not sure how to get it to run. I know I could ...
0
votes
0answers
43 views

Unity Input manager with chain of responsibility and delegates

I am working with unity and I am trying to build a better input system for my game. In essence there would be a singleton class that is the input manager. The player would subscribe to the manager ...
0
votes
0answers
29 views

odd behaviour with Linecast

I've been linecasting to determine if there is a wall in front of the player, and if there is, stop the player where the linecast hits the wall. My relevant code is this: void ...
1
vote
1answer
56 views

Unity - Plugin 'MFC100U.DLL' is used from several locations:

As per subject, I got this error message using Metaio SDK in Unity5. BTW, I'm using Mac, not Windows machine. Plugin 'MFC100U.DLL' is used from several locations: Assets/Plugins/x86_64/MFC100U.DLL ...
0
votes
1answer
47 views

How can I get complete path of a sprite?

I want to get a path of sprite using the spriteRenderer component in Unity.I want my path should be like - "asset/PATH OF MY FILE/FILENAME.EXTENSION". Currently I am using following code but it ...
0
votes
0answers
27 views

Unity linecasting issues

I know the problem is that my game is 2D (so my sprites have 2d components too) and I'm using a 3D linecast but I still don't know how to fix this issue -- using linecast2d gives me problems as well. ...
2
votes
1answer
88 views

Evil Genius styled building system

I'm currently playing around with a base builder/manager-esque type of game similar to Evil Genius. To build a room I would like to have the following process: 1. Select room type 2. Click and hold ...
2
votes
1answer
90 views

What is a reasonable way to avoid GC issues in Unity?

I've been reading about how garbage collection is a big problem when programming games using C#, Java, and the like - if you have a large amount of objects, the GC will run sporadically and scan ...
0
votes
3answers
92 views

How to change the gravity with a click

How to change the gravity of a ball upward with a click Then change it again downward with another click And so on In unity
2
votes
1answer
84 views

How to rotate an object along its trajectory path?

I have a missile launcher that uses initial velocity for the trajectory. I edit the launch angle from the editor, and then the script calculates the initial velocity required to land the missile to ...
0
votes
1answer
37 views

Unity3D - Change player input axes on trigger

Hope someone can help me with this, it seems like it should be a simple problem but that only makes it more frustrating! I have a simple game where you roll a ball around by applying force to the ...
0
votes
0answers
36 views

Is resource management a good idea when dealing with animations?

New to the Unity environment here and I have a question concerning how to efficiently manage computer resources in a top down 2D game. I have a large area that looks like a 2d rpg from the 90's and ...
0
votes
1answer
46 views

Rotation with respect to world instead of the object itself using Quaternion.Euler in unity

[Other answers on similar questions on stackexchange didnt help] This script is giving some weird outputs On running this script If I press rightarrow once followed by 's' the object rotates on 'z' ...
0
votes
0answers
36 views

Is there any way to bring animation into unity without a rig/bones?

I am developing for mobile and to make the game run on lower spec mobiles, I was only going to import bones/rig for the main character. There are other humanoid characters in the scene which do move ...