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
8 views

Smooth Camera Follow

I am using a fixed static background. I have a gameobject(Current ref. image) which is moving with the help of waypoints. I have made camera to follow the Current. The camera is stuttering while ...
1
vote
1answer
12 views

Unity 5.1 Asset bundle for windows

I am working on the asset bundle method, i know how to use the asset bundle for untiy 4.x series but i am trying to do this in unity5. I heard in unity 5 is more compatibility to do. I searched in ...
0
votes
2answers
52 views

How do I refer to the object that called a function?

I have a large number of buttons instantiated from a prefab using a loop, as follows: public void LayoutButtons() { GameObject newCanvas = Instantiate (canvas) as GameObject; for ...
1
vote
0answers
38 views

Unity3D with C++

So, my game is being developed in pure C++, with very limited dependencies (Mostly just pocoproject). The main goal here is portability, not performance. The code runs on multi-platform clients, as ...
1
vote
1answer
25 views

Move ball based on direction of force?

I'm trying to make a ball that will move in the direction I push it from, and later pull it to me based on where the player is standing. using UnityEngine; using System.Collections; public class ...
0
votes
1answer
9 views

Unity3d Object reference error

Hi I am in a bit of a pickle, I keep having this error pop up after importing another scripts components. NullReferenceException: Object reference not set to an instance of an object ...
0
votes
1answer
25 views

Finding enemy object in player's forward direction within a range

I would like to know the way by which I can find enemy objects tagged with "player" in a forward direction within a range say 3 units from the player.
0
votes
0answers
9 views

Compiler error when building for Android after exporting Oculus assets

I have a Unity project which I'm planning to build both for PC and Android. The project is a VR game. For PC I'm using the Oculus SDK and for mobile I'm using ALPSVR SDK. I was working solely with ...
0
votes
0answers
29 views

Card/Tile Game, loops dont update element0 of playerHand properly

The Problem I am dealing from another class and into a player's Tray(A class with a List of Tiles and an array of bools to show that a slot in the tray is full). When dealing into the player's tray, ...
0
votes
0answers
14 views

Unity5x GetComponent<Animation>().Play(“sequence”.StopAll) not working

I'm working with Unity3D 5x using C#. I've attached collision detection to the character controller script that plays a "gothit" animation clip (using legacy animations). Here are the code snippets, ...
-1
votes
1answer
43 views

How can I can create a world that a player can easily get lost in?

I am a 3D environmental artist and I'm currently planning an independent passion game project of mine. I have the concept of crazy hallways that lead to the rooms that the player has already visited, ...
1
vote
0answers
12 views

Google Play Games Signs Out Automatically without Internet Unity

I am using this in my game to implement games saving and loading. I have also tried the basic sign in process by using the following start function :- { PlayGamesClientConfiguration config ...
1
vote
0answers
12 views

Is there a way to control the ordering and grouping of ShaderLab Blend command?

I'm writing a shader in Unity that responds to 3 lights: 1 directional and 2 point lights. The point lights are processed in the ForwardAdd pass (once per light). I need the ForwardAdd pass to blend ...
-4
votes
0answers
23 views

How do i like record a video in my phone and play while its filming thx

Ive tried like recording then pressing home button and playing games and when im done it does not work
3
votes
2answers
35 views

How to manipulate the two variables that rotate the camera with Input.GetAxis(“Mouse X/Y”)?

A helpful fellow showed me the script for a free look camera mode that rotates with the mouse. The script is included at the bottom of the page. I want to have a system that right clicks once to ...
3
votes
1answer
35 views

Skydome and Ambient Intensity (Unity)

I've made a custom skydome in my game. For all my lights I have set them to not affect the skydome. The only thing affecting the skydome is the ambient light. For my game I have ambient intensity at ...
2
votes
1answer
37 views

Decelerate moving platform at targets

I'm trying to make a moving platform move at a constant speed and then when it is near the target start to slow down, I have trying to do this with Lerp, but I'm not satisfied with the results because ...
-1
votes
0answers
27 views

Does game servers use optimised packet builders?

I am a Unity developer, i have worked with all popular networking solutions, such as Unity built in, pun, photon server, smartfox, unet. Recently, for my own personal project i wrote my own server, i ...
0
votes
0answers
12 views

OnMouseOver() alternative for iPhone (Unity3D/Unity2D)

I am currently developing a game that uses the OnMouseOver() function of a MonoBehaviour object. Is there a true alternative for iPhone? Would I be better of coding my own? Thanks in advance
-1
votes
1answer
22 views

Right-side weapon rotate to face the mouse target

I have a 3D game looking from top to bottom where I move the mouse to aim at targets. I have a simple box (the player) with a sphere on its middle-front (that is the pistol) and a cylinder on its ...
2
votes
2answers
120 views

Make camera follow and rotate with player without childing it

I want to have a camera, that follow the player, without childing it to the player object. So far I have this one line, that follows the player, but does not rotate with it (meaning the camera should ...
2
votes
2answers
52 views

Problem with coroutines unity 3d

I cannot understand why the coroutines are not waiting the designated number of seconds before executing the code below it. At the moment, the animation bleeds into the next state. I could get around ...
2
votes
2answers
86 views

why is my enemy AI is on air while moving?

In Unity3D I have created an enemy AI and applied a script for it to move and chase the player. But when moving, the enemy hovers in the air. My character also does not have rigidbody and he just has ...
0
votes
0answers
22 views

Build custom editor to UI elements

I want to add some extra functions to editor inspector for UI.Button but, I can't setup my script in this way :-/ How can I write custom inspector for UI Objects ? This is what I wrote: using ...
1
vote
0answers
32 views

Unity - Vector3.Reflect not reflecting correctly

I resolved the question on how to draw a line, so here is the result: https://www.dropbox.com/s/hvc9yr3jjbqdv7r/dc.jpg?dl=0 So, now I want to create a line that shows the possible bounce off the ...
1
vote
2answers
41 views

Character controller passes through mesh collider

I need a little help figuring out what's going on with an NPC's character controller. Here are the character controller settings for the NPC. The problem I'm running into is that the NPC isn't ...
1
vote
3answers
46 views

Need help with physics 2D Unity

I'm making a 2D game in Unity. Basically there's just a rocket that goes where ever the user touches. With the code that i have right now, the rocket instantly rotates towards the point and moves ...
0
votes
1answer
21 views

Increasing friction or Adding force relative to transform position in Unity 2D?

Back again with a quick question! I have a few basic platforming mechanics going on in this scene. I have a prefab platform with an animation that loops back and forth between two different x ...
1
vote
2answers
49 views

Unity 3D - Confine a gun rotation within certain degrees

I am having troubles making my gun rotate up and down, and have limits, for example, I want the down limit to be 0 degrees, and the up limit to be 90 degrees. Currently I can't figure out how to ...
2
votes
2answers
82 views

How to draw a line in 3d space?

I have a top down billiard game. And on click / tap the ball moves in the clicked direction like in the image below: Now, I want a line to be drawn in the direction where the mouse is hovers or the ...
1
vote
1answer
48 views

How should asset bundles be divided?

The only way to load an asset from an asset bundle into memory is to load the entire thing, decompress and pull out the asset you want, then unload the entire thing, except the assets you want. This ...
1
vote
2answers
38 views

Vision Cone for Enemy AI in Unity 2d

I am trying to develop an Enemy AI with vision cone in unity 2d top down game, can you please suggest me some approach or sample script, so I can get an idea.
1
vote
2answers
145 views

Render sprites onto a virtual 640x480 “screen”

I'm making a game, and in part of it, the player uses a computer terminal. I want to draw to a virtual 640x480 screen with pixel precision, and then draw that "virtual screen" to the player's real ...
-1
votes
0answers
31 views

Water gets really dark when camera is far away

I'm trying to create an over view map of a whole world, but I'm having lighting/color issues with the water. When the camera is high up, it's really dark: When it's lower: My workspace:
0
votes
1answer
47 views

The more appropriate way to find GameObject in the scene

Which way is the more appropriate to find GameObject in the scene. I know that GameObject.FindGameObjectWithTag is faster than GameObject.Find but i wondering whether FindGameObjectWithTag is better ...
0
votes
1answer
29 views

Why does my code only work when there is a debug statement? (Unity)

I have a script that controls how the particles in a particle emitter should look. (XNA example here) Yet it doesn't seem to update correctly. With an orb that should have 50 particles only a few ...
1
vote
0answers
12 views

Unity Engine: How to change mointor/desktop resolution in 4.5.3 and higher

As of unity 4.5.3, Screen.SetResolution and the Unity Resolution Display Dialog, by default, no longer change the monitor/desktop resolution. Instead, it only changes the render target resolution for ...
0
votes
1answer
17 views

Rotating 2D-Projectile towards mouse, hides the projectile (Maybe changes the layer)

I want to shoot towards my mouse, which is working fine now. After this was solved, I wanted to rotate the projectile, so that it's looking to the mouse. This is my code: projectile.transform.LookAt ...
2
votes
3answers
49 views

Unity - Check if object is facing Vector3 coordinates

I am having a hard time figuring this out, I want to have objects that move around randomly, and when they get new coordinates to move towards, face them, and then move. Here's explained: Target ...
0
votes
0answers
67 views

How Can I Make These Collisions Work Outside Of Unity's Built-In? (C#)

I'm having some trouble working out what's wrong with my code. Basically I want to have my player be able to collide with obstacles it's flying through. So I have an obstacle, and a pathway or two ...
0
votes
1answer
25 views

Uncontrollable platform spawning

I made simple spawner like this: void Update() { if (PlatformPosition.spawnNewPlatform) { NewPlatform(); } } public void NewPlatform() { if (active) { newTransform = ...
1
vote
2answers
52 views

How to use Input.GetAxis(“Mouse X/Y”) to rotate the camera?

I want to make a first person camera that rotates with the mouse. I looked at the Input.GetAxis Scripting API page and found a sample code, which I have included at the bottom of my post. Upon trying ...
0
votes
0answers
36 views

Making certain GameObjects visible for a camera

I have 2 cameras in my 2D game. One displays gameobjects normally, and the other camera draws some of these gameobjects reflected (scale.y *= -1). The reflected camera would draw only objects in the ...
0
votes
0answers
16 views

show different color areas of image on touch

How do I show colors filled in on a colorless version of an image on user touch. (for example color mania or guess the colors app). I know one way is to provide the same image 3 times (for 3 colors) ...
1
vote
2answers
55 views

Waitforseconds is skipping over

I have a function for a timer using waitforseconds but instead of waiting for how long I want to, it just skips it. A ui text should become "foo" then 5 seconds later become "bar" but it turns to ...
1
vote
2answers
32 views

Get the current time of animation using script Unity3d

I want to know the current time of the played animation using script in Unity3d. I tried using currentState.normalizedTime but this time is not the time of the animation, like it's the time of the ...
1
vote
1answer
76 views

My bullet changes the velocity depending on where I click

I want to build a little 2D-Sidescrolling shooter and I'm now at the shooting script. I already figured out how to shoot a bullet towards my mouse pointer. I got something like this : Vector3 ...
-2
votes
0answers
14 views

Android unity Build error [closed]

i add the admob in my unity project i got this error Error building Player: Win32Exception: ApplicationName='javac.exe', CommandLine='-bootclasspath C:/Android/sdk/platforms/android-21\android.jar" ...
1
vote
2answers
62 views

Orthographic Camera settings for a 2D game

I'm starting out a 2D wrestling game in Unity 5 and i need some help. The default resolution of game needs to be 320x240. The background sprite that i would be using is 640x480. The camera would move ...
0
votes
0answers
15 views

On which platforms does Unity support dynamic linking?

Unity3D allows me to import .dlls and execute the code they contain. However Unity supports a range of platforms, each with varying features and requirements. As such they have varied their approach ...