Questions tagged [unity]

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.

Filter by
Sorted by
Tagged with
-2
votes
1answer
394 views

How to make game menu in Unity using only the editor?

I am trying to implement a game menu screen in which all the levels are locked initially. Just like Angry Birds. When user scores he'll be promoted the level unlocks.
-2
votes
1answer
55 views

How do I properly scale a Screen Space Overlay with its children?

I have a Canvas on which 3 Text objects are hosted. These text objects are anchored so that they move and scale with the canvas if the canvas has "World Space" render mode. Now I need to set the ...
-2
votes
1answer
42 views

How to automatically rank items in an array by the sum of certain of their properties?

I am making a little boxing management sim in my spare time. What I'm stuck on is trying to give the pool of boxers their initial rankings. I have a List<> of Boxers all with random stats. Each ...
-2
votes
1answer
24 views

Help me understand the numbering of buttons in GetMouseButtonDown

I'd like to know what the "0" stands for in this code: if (Input.GetMouseButtonDown (0)) // Do something here
-2
votes
1answer
339 views

Which collider should I use for a bucket?

I have a bucket, and I want a ball to be able to enter it. I'm facing a problem: Unity mesh collider seems not work with concave object... is that true? How can I solve this?
-2
votes
1answer
112 views

Timing a sound effect

Why does this not work? I'm trying to get the sound effect before the visual, but I don't hear it until I move away from the location. This is part of a routine that is called from Update on the ...
-2
votes
2answers
73 views

What does this statement mean? [closed]

I am new to Unity as well as programming, I came across this statement and couldn't comprehend what it meant, var result = numX != lastnumX || numY != lastnumY; ...
-2
votes
2answers
5k views

Get Angle with respect to 360 degree

I have fixed object, around its an object is moving in circular shape. Now i am willing to get my moving object angle with respect to fixed boject like form 0 to 360. How can i do this. i tried this ...
-2
votes
1answer
653 views

C# syntax for “This button is interactable”?

What should be the C# syntax for the condition if (This Button is interactable)? I have a script attached to the button, Which has to run only if the button is interactable. Thank you in advance!
-2
votes
2answers
423 views

UnityEngine.Camera doesn't contain definition for “active”

So I'm just trying to create a simple script in C# which will allow me to switch between two cameras, named Camera1 and Camera2. But I have run into the error UnityEngine.Camera doesn't contain ...
-2
votes
4answers
3k views

How to make an OnCollision reset level script?

I am making a game and I want to make a script that if a player collides with the resetting object the scene will reset/reload.
-2
votes
2answers
999 views

AddComponent with string in unity5

At runtime I want to copy one Gameobject component to another gameobject. In my case I have one camera where multiple scripts are added with values settings. the same components i want to add into my ...
-2
votes
1answer
115 views

Is it possible to convert this if-else chain to switch-case? - Unity C#

Here is the code: ...
-2
votes
2answers
3k views

How can I make 2D games like shovel knight? [closed]

To make 2D games like shovel knight, do I need specific software? Would this be possible to achieve in Unity or would I have to use something else?
-2
votes
1answer
425 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 ...
-2
votes
1answer
374 views

Unity and Linux [closed]

Is it slow to run unity with wine? And are there any plans for unity coming to the Linux platform. Since i now that it can create a build for Linux i wish it was coming for Linux as well.
-2
votes
1answer
3k views

Unity - How To Save Some Variable WIth PlayerPrefs?

I have a small problem. in the game that I'm creating I created an array of items, each item includes a number of variables (cost, level, etc.). my goal is to save your own variables for each item, ...
-2
votes
2answers
2k views

How to make an object move and your player move in Unity

I am making a project in Unity 4.6.1 and I don't know how to make the enemy move to certain points. I would want it to move to 2 to 4 points or more. I also don't know how to make the player move (not ...
-2
votes
1answer
822 views

How can I parse the leaderboard data returned from Google's API?

We're developing our first Android game and we want to get leaderboard data from Google Play Game Services and use the score data from the different leaderboards. I am able to use Unity's ...
-2
votes
2answers
561 views

AI shooting through walls [closed]

I made a AI shooting script for my new game but the problem is that the AI ignores the walls and shoots through walls. This is my ai script : ...
-2
votes
1answer
4k views

Object reference not set to instance of an object Unity3D c#

...
-2
votes
1answer
3k views

Disabling / Enabling object renderers on click

I am working on unity2d. I have six game objects: Object1, Object2, Object3 (these are images) ObjectImage1, ObjectImage2, ObjectImage3 (these are images). I have arranged the object in the scene ...
-2
votes
1answer
274 views

Why is my Snake' tail rendering the wrong sprite? [closed]

I am making a snake game in Unity. The game is simple, using Texture2D to display the head, tail and body parts. I am stuck with this problem: I stored 4 textures (...
-2
votes
2answers
975 views

What knowledge do I need to learn Unity? [closed]

What do I need to get into using Unity? Do I need some knowledge in any language in particular? Can I just get to know the program with tutorials? What would you recommend?
-2
votes
2answers
39 views

Want to stop instantiating objects when timescale is set to zero

I have my enemies being instantiated from both left and right sides and I've used Time.timescale=0; for the pause menu script so whenever i pause my game everything stop other than the instantiating ...
-2
votes
1answer
78 views

How can I change position of camera?

I'm working on 3D game, where the player needs to complete 4 play fields called "homes" in level 1, then progress to level 2 which has 4 homes of its own. In level 1, when the player completes the ...
-2
votes
1answer
280 views

Why is my coroutines not working with in the if statement?

Isn't it possible to start co-routines under certain conditions? Or, it should only be started at the initial steps only? There is an enemy which will be de-activated after certain condition which ...
-2
votes
1answer
39 views

How many unity version support with 1 seat?

I bought plus unity license 1 seat so Can I use it on 2 unity version Example: Uity5.3.4p3 and unity 20183.18f1 Or it use only for one version?
-2
votes
1answer
78 views

How to make a person walk within a Unity scene? [closed]

I have a person in my Unity scene. My person follows waypoints and move. However, the movement is very unrealistic, the person seems to be floating through the scene rather than walking. How to make a ...
-2
votes
1answer
169 views

How to move a 2D boat in unity

I am working on a 2D game in which boat moves continuously but the direction of the boat is on users touch. Where the user moves its finger the boat moves in that direction. How would I achieve this? ...
-2
votes
1answer
239 views

How Can I Roll A Cube In Unity?

Roll a cube in 1 direction Hi, I want to move a cube just to the front when the screen is taped in my Unity 2D project. I have seen some codes about this but I just need to move it in one direction (...
-2
votes
1answer
82 views

make the ball stick to the path

Hi guys , I want the ball to stick to the path and whenever it find a corner like in the image it continue normally without flying away .
-2
votes
1answer
2k views

RenderTexture.Create failed in Unity. please help me

RenderTexture.Create failed: width & height must be larger than 0 UnityEngine.RenderTexture:Create() Prime31.SpriteLightKit:updateTexture(Boolean) (at Assets/SpriteLightKit/SpriteLightKit-master/...
-2
votes
2answers
1k views

Unity 2d how to stop infinite jump

So my problem is very common but as far I am able to find tutorial on how to stop game object to do infinite jump is make a bool then set if y velocity == 0 then set bool to true else its false but ...
-2
votes
1answer
2k views

Android Phone Back Button not working Unity

I take an empty gameobject and a script in which I just write below code to handle back button in android phone, but it's not working. ...
-2
votes
1answer
2k views

How to start a Coroutine in another script?

I did some research about this but what i found was kinda confusing so I didn't actually understand it. Basically I have a coroutine that displays an image after 5 seconds, but I want that image to ...
-2
votes
1answer
61 views

Enemy (prefab) Behaviour messed up

I have created a prefab of an enemy with a NPC Behaviour script attached to it. The enemy correctly detects the player's position and walks (with animation) towards it (NavMesh Agent). If in range the ...
-2
votes
1answer
966 views

Unity - Progress bar with sprites

I have 4 images that I made in photoshop that represent the progress the player is making in the game. When you finish the first level the image changes, when you finish the second level changes again,...
-2
votes
2answers
1k views

Play a sound when moving cursor on a button?

How to play a sound when moving a cursor on a button ?
-2
votes
1answer
517 views

Stacking cubes on top of each other [closed]

How can I stack cubes on top of each other? I dont want to know the code of it just how can it be done? Imaging putting cubes on top of each other in a 3d world with the cube being freely moved in all ...
-2
votes
1answer
430 views

How can i add to a List<Bitmap> also strings? [closed]

In the top i have: private Dictionary<String, List<Point>> pointsList; private List<Bitmap> Scales = new List<Bitmap>(); Then in the ...
-2
votes
1answer
395 views

'NullReferenceException: Object reference not set to an instance of an object' when similar code works

I am getting an error when accessing a function from VirtualRotationStick, despite the fact that a similar VirtualJoystick works ...
-2
votes
1answer
2k views

Audio Source object reference not set to instance of an object in Unity.

I have the following script: ...
-2
votes
1answer
2k views

Record voice and play in unity?

i wanted to ask that does unity3d support audio record and playback option and if it does, how is it possible to just speak and the application will record the sound and play it back after a little ...
-2
votes
1answer
40 views

Random copies of an object?

If I press C<\kbd>, several copies of a prefab show up in the scene. However, my script only creates one. I need to make a random copies, like between 1 to 5. How do I do this? ...
-2
votes
1answer
7k views

How do I load scene using scene manager build index in the build setting unity3d

I only got one scene to load when the timer reaches zero; I need one more scene to load. The scene manager builder index is not working for me. I have tried ...
-2
votes
2answers
5k views

How solve 400 Bad Request error in unity? [closed]

400 Bad Request UnityEngine.Debug:Log(Object) FBScript:DisplayUserName(IResult) (at Assets/Script/FBScript.cs:63) Facebook.Unity.c__Iterator1:MoveNext() (at Assets/FacebookSDK/SDK/Scripts/Utils/...
-2
votes
1answer
77 views

How to make my “first person controller” continue to turn left or right when key is pressed in Unity 5?

I recently posted this How To Make My First Person Controller turn left and right in unity 5 but now I'm having a slight problem when I press the key that turns my camera it only does it for a little ...
-2
votes
2answers
235 views

Publishing a Unity game to Android/iPhone

How can I publish a game that I made in Unity onto Android and iPhone? How do I generate the Android/iPhone binaries?
-2
votes
1answer
69 views

Where to put the script? [closed]

I watch this video https://www.youtube.com/watch?v=Uhnh8zj_VPo and my question is where to put the script? I'm a complete noob here but I've at least build a map and moving player character. Yes, ...

1
249 250
251
252 253
255