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
3 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 ...
-3
votes
1answer
13 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
30 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 ...
2
votes
2answers
26 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 ...
1
vote
1answer
32 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
22 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
11 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
0answers
21 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
115 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 ...
1
vote
1answer
40 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
82 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
29 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
38 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
2answers
42 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
19 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
45 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
39 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
36 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
142 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
28 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
11 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
16 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
48 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
64 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
51 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
53 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
29 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 [on hold]

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" ...
0
votes
2answers
60 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 ...
0
votes
0answers
30 views

How should I organize multiple materials?

I'm making a tile-based game, in which many tiles will be of the same type, and so I want to avoid having the same texture for all of them. I'm thinking of having multiple textures for those widely ...
7
votes
2answers
584 views

How can I model a star?

I'm trying to model a star in Unity, and it, sort of works, but it's not ideal. Currently, I'm using a large sphere with a self-illuminating material containing a star texture applied to it's surface, ...
1
vote
0answers
42 views

How heavy is a scene load in Unity assuming all referenced objects are in memory?

From what I understand, resources that are local to a particular scene( not a prefab, or texture, material asset etc ) are embedded in the scene file itself, while external resources are just ...
1
vote
0answers
17 views

How do I force Unity to reload editor scripts

I am working of some editor scripts for Unity but have found that it is difficult to force Unity to reload my editor scripts. My scripts are modelled on the static constructor approach and perform ...
1
vote
2answers
52 views

Preventing a Combination of Rigidbody Jump Force & Bounce Magnitude in Unity3D

I'm building a fairly simple marble racing game in Unity3D. The ball is a 3D physics object that moves only on the X and Y axes. It has the ability to roll left and right, and to jump. Pretty basic ...
1
vote
3answers
82 views

Creating interiors in Unity

I'm trying to use the vanilla Unity Editor to make some interiors (with primitives like cubes etc). It's a hard process by itself because you have to do all sorts of calculations for scale and ...
0
votes
2answers
62 views

Unity 3D, Making contiguous looking worlds

Im currently involved in making a third person cooperative mobile game in Unity and in said game there will be an area for players to walk around in with various elevations and whatnot throughout the ...
0
votes
1answer
32 views

How can zoom into my object when that object is being clicked?

Suppose that I have the three game(cube,Quard,sphere) object. When I click on a particular game object suppose think I have clicked on the cube,the cube object should get zoomed in on the screen. how ...
-4
votes
1answer
32 views

What you think about Digital-Tutors? [closed]

I want to ask if there is any one try Digital-Tutors site as content i see it's very good but i want to make sure before i rush into it .
0
votes
0answers
12 views

Unity - Decrease/Increase the “Z axis” angle axis on Update()

What is the best way to Decrease/Increase an angle without using "eulerAngles"? I need turn my transform between 30 and 325, according to my "Y axis". If it is less than zero we reduce the value of ...
-1
votes
1answer
21 views

Unity not showing full text

This is simple issue, I'm trying to put in text, but it keeps cutting off, I found nothing in it's settings for text limited
0
votes
1answer
37 views

Game maker or unity for 2d games [closed]

I'm new to game dev but I know how to code. I would like to try my hand at making a 2d game. I am overwhelmed by the ear between unity and game maker. Which one would be better to use. I thought unity ...