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.
0
votes
0answers
5 views
Creating Fog Of View in 2D game with lighting method
I'm creating 2D side scrolling game with Unity, and i want to add feature where the player come into a cave, then all going dark, the player turn on the flash light, so the player can see around ( ...
-2
votes
2answers
48 views
how to set an background image?
I am trying to create a game on unity but I am new at unity.I want to make a start menu and I want to set a background image then I will put "play" or "exit" buttons on this image.How can I do ...
0
votes
1answer
34 views
How to check if grounded with rigidbody
Does anyone have a better way to make an object with a rigidbody check for ground and then jump, right now I wrote a script where a raycast is cast downwards and it checks for distance but then I ...
-2
votes
2answers
58 views
How to stop game but animation is running?
i want stop my game but the animation is runnig.
how to make it ??
for Example :
i call anim,
i want when press the eScape , my game stop but animation is running.
void Update()
{
...
0
votes
1answer
33 views
Quaternion.Lerp not working properly in Unity3d
I'm using Quaternion.Lerp to rotate a joint with a certain angle, but when I use the below code I find the joint rotating very far although I specified it to rotate with only 5. Any thoughts please?
...
1
vote
1answer
46 views
How to change the transparency of an object in Unity c# scripting?
I have laser-object in my scene, which I want to be seen only when I press the 'E' button on the key board(just an example of a key).
I have seen many ways to change the transparency , however, none ...
-1
votes
0answers
18 views
Can I use Unity 5 without payment? [duplicate]
I'm just a teen that wants to get into game development, and so can i use unity 5 and make a game? If I decide to publish my game on the app store or something at any point will i have to pay some ...
0
votes
0answers
10 views
Unity fill in Sprites/Animations at runtime for Mecanim & State machines
I'm creating a 2D wrestling game in Unity 5. There are going to be 10 or more characters with exactly same states like walking, running, idle, jumping etc and same sprite names. I'm not sure but It's ...
0
votes
0answers
42 views
In the Unity Editor, how do I find prefabs containing a specific component?
I want to find all prefabs in the project that contain a specific Component?
I only need this in-editor; no need at runtime.
If they are in added to the Scene, I can right-click and Find References ...
-1
votes
1answer
16 views
Save unity audio clip to mp3 file [on hold]
I want to save a recorded sound in unity to mp3 file; I found a library for save it to wav fil :
http://answers.unity3d.com/questions/354401/save-audio-to-a-file.html
How can I save audio clip to ...
1
vote
3answers
38 views
Collision Detection/Response Issues in Unity
Sprite A: Box Collider 2D and Rigidbody 2D.
Sprite B: Box Collider 2D.
Both sprites have a Sprites/Default material with Pixel Snap enabled. The textures being used are set to Truecolor Format and ...
0
votes
1answer
36 views
What will happen with PlayerPrefs data after updating the app?
I'm using PlayerPrefs (Unity3D, on Android).
If a user updates my application via the Google Play store, what happens to the data I've stored in PlayerPrefs?
0
votes
1answer
22 views
Instantiation of multiple objects with varying velocities
I am looking to multiple objects of the same prefab at the same time with varying velocities.
public GameObject prefab;
public float xDirection;
public float yDirection;
void Update () {
...
0
votes
3answers
53 views
2D Physics friction on a moving platform?
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 positions, but does not begin looping ...
1
vote
1answer
30 views
Unity 3D - Rotate towards object with random offsets
Title is a little confusing, but let me explain:
I want to make the enemies look at the player, and shoot at him, with random precision, meaning that one time the enemy will shoot a little bit to the ...
-3
votes
0answers
47 views
A* pathfinding for enemy prefabs [on hold]
I want to modify for multiple enemies generated randomly following player when player gets in range.
my code works ok for the single enemy but after adding prefabs cause issues. Need help.
Thanks in ...
1
vote
1answer
50 views
Unity3d seamless level loading
I've read that application.loadLeveAdditiveAsync is a pro only feature. I'm looking for an asset that can do something similar. I would like to load assets based on the camera/player position. ...
0
votes
2answers
37 views
What is the alternative to Time.time for scrolling texture?
In my game, I'm using the standard SetTextureOffset method to smoothly scroll texture on background quad.
However, on game over, instead of reloading the scene, I'm just reseting all values initial ...
2
votes
1answer
41 views
Vibration on Android
How to change duration of vibration on Android(Unity3D)?
For example:
public void Jump()
{
if (grounded)
{
rb2d.velocity = new Vector2(rb2d.velocity.x, jumpPower);
...
0
votes
0answers
23 views
Unity - Meta pass and Precomputed Realtime GI
I am writing a shader in Unity and I would like to use some special values for the precomputed realtime GI. I am using a vertex fragment shader as it seems that it offers much more controls than a ...
0
votes
0answers
5 views
Error while running Unity WebGL build on MAMP localhost
I have built my game for WebGL platform and tried to run it on MAMP localhost. I am getting the following alert message in Google Chrome (Version 44.0.2403.125 (64-bit)) and in Safari (Version 8.0.3 ...
1
vote
1answer
36 views
Unity3d change texture on terrain at specific vector3 at runtime
I need the terrain texture to change at certain positions depending on where trees etc. are randomly positioned at runtime. I'm struggling to find any solid information about how to take a particular ...
2
votes
1answer
25 views
What framework do you reference for external dll's to work with Unity/Mono?
So I want to compile an extensions dll for a unity game because I feel I'll end up reusing these extensions in other games/projects too - and I want to learn about external dependencies with Unity. :)
...
0
votes
1answer
26 views
My GUI stopped working?
Okay I bought this asset online so I would like not to show the whole script. The problem is this asset stopped working when I updated from unity 5.0 to 5.1.2. The script is for a controller GUI ...
0
votes
0answers
35 views
Use line renderer to make a gun flare [closed]
How can I use a Line Renderer component to create an effect of a trace of a bullet after the gun fired.
Should the line remderer be animated through scrip or by animation component?
0
votes
2answers
35 views
How do you promote your assets in Unity Asset Store? [closed]
Can you share your experience in asset store promotion?
1
vote
2answers
60 views
Will reseting a scene instead of reloading it improve performance?
I made a 2D infinite runner. My game was approved for iOS and now pending release. However, on Android, performance is a nightmare. So I'm tweaking to optimize performance. As it stands now, there is ...
1
vote
2answers
81 views
How to know from which direction there is a collision with an object? In Unity C#
In the game, there is a ball, and moving objects that can hit it. I want the ball to move when an object hits it. But the ball should move to the right direction, the one which the collision was from. ...
0
votes
1answer
26 views
Cube bounces back with rigidbody and script in Unity
I have Unity 4.6.1 and I added a cube with a moving script and a rigidbody. The script is:
#pragma strict
var speed : float = 10.0;
function Update () {
// Is the user pressing left or right ...
0
votes
0answers
16 views
Unity forward render path creating pixel lines between meshes
I have a bit of a problem where my meshes are either unsmooth because I'm using deferred rendering path or they are smooth using forward rendering path but it creates this weird pixel line between the ...
0
votes
1answer
26 views
Stop player following cameras cameras direction
Okay I'm not going to go to much into it but this is what I need my script to do. The way I have my controller set up is that the camera looks to the side of the player a little bit. I use this for ...
-2
votes
1answer
34 views
Save the screenshot of the scene locally in unity
I have a unity project which contain a button in the scene. I have loaded a terrain also into the scene. When I run the project, the terrain and the button will be shown. When I click on the button, a ...
1
vote
3answers
67 views
How to load and unload objects at a certain radius from the player?
I am making a procedurally generated space exploration game in unity. I'm currently generating 5000 stars in a cube of a fixed size. Each star just gets a random 3d coordinate. What I would like to do ...
0
votes
1answer
40 views
Can I include 64-bit DLLs in a Unity 5 project?
I am building a C# DLL for inclusion in a Unity project. Due to some dependencies, this must be a 64-bit DLL. The last time I checked, DLLs for Unity had to be built with .NET Framework 3.5 (although ...
2
votes
0answers
31 views
How can the Server send a message to a single Client?
I'm trying to send an Rpc, or any sort of message, to a specific client instead of to them all.
I'm completely at the loss trying to associate a NetworkConnection with its own authoritative spawned ...
0
votes
1answer
33 views
SerializeField vs GetComponent Efficiency
As far as I know, there are two built in ways to get an instance of a component in Unity.
1 - Serialize the field and drag in the component manually in the editor
[SerializeField] private MyScript ...
0
votes
1answer
42 views
FPS horizontal smooth camera rotation
I have a problem, my camera is parented to the FPS Controller prefab, then there is a script I wrote for the rotation of the player horizontally by mouse movement, it all works but the rotation is ...
2
votes
4answers
305 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 ...
0
votes
1answer
36 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 ...
1
vote
2answers
81 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
2answers
112 views
Unity3D with C++ [duplicate]
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
3answers
60 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
11 views
Unity3d Object reference error [closed]
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
32 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
20 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
1answer
38 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
1answer
32 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
63 views
How can I can create a world that a player can easily get lost in? [on hold]
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
19 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 ...