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
2answers
18 views

Unity2D Sprite flips camera when moving left and right

I am using the Unity Engine and coding in C#. I have a sprite as a parent with a main camera as a child so that the main camera follows the sprite. However, when pressing 'A' and 'D' to move the ...
0
votes
2answers
45 views

How to move a cube withour rolling it?

I am trying to move a cube with my keyboard on a plane surface. However, the cube always rolling instead of moving. How could I slide the cube on the plane? What I have done: I added a plane game ...
0
votes
1answer
28 views

Whats causing this weird texture stretching on my mesh?

Making this mesh via code and the texture seems to only tile on the sides, but not on the top. Any idea whats going on? public class CoreMeshCreator : MonoBehaviour { //Initialization public void ...
-1
votes
1answer
30 views

How do I make my character run infinitely? [on hold]

I got my character running right (can't run left) and jump but I don't know how to make him run infinitely can anyone help? using UnityEngine; using System.Collections; public class Player: ...
1
vote
1answer
48 views

How do I make my character stop going left? (Unity)

So I have this code and my character can go left, right and jump. I don't want the character going left , so how can I remove that. (I'm very new with coding) using UnityEngine; using ...
3
votes
1answer
54 views

Determine if an object is inside a ship's turn radius, rotation via torque

I have a 3d space game where all ships move around using physics. I am trying to determine if a given object is reachable by a ship at a given velocity and turn radius. I believe the formula for turn ...
0
votes
1answer
44 views

Is there anything to keep in mind when choosing Boo for Unity development? [on hold]

I just noticed that Unity has Boo as a compatible language but I haven't seen any tutorials using Boo nor any games. I love Python and would like to code in its syntax - maybe for a small project. ...
1
vote
2answers
50 views

How to detect collision of a wall with grid movement?

I have this little game, where my player is moving around a simple level, using a grid based movement script (See code below). My problem is that I have tried to implement a 2D raycast, which has to ...
1
vote
0answers
21 views

Multi-layered tilemap

I need to be able to efficiently render a tilemap which can be constructed this way: There is one non-transparent base layer Then there can be 3 partially-transparent layers on top of it. Each tile ...
-1
votes
0answers
40 views

Gamesparks Vs PlayFab… Which to pick? [on hold]

In terms of ease of integration and pricing, which of these two systems would you prefer. I need push notifications, in-app purchases, leaderboards, and user management. I have looked at both ...
0
votes
0answers
20 views

Browser game - small models with tileable textures vs one big model and one big texture

I am few years behind in terms of browser capabilities. I plan to combine 3D with pixel art, and I am going to use Unity to make a browser based game. I have made a stage that is one model and has ...
1
vote
1answer
19 views

Animator has not been initialized

My animation is working but unity keep saying that my Animator has not been initialized error Here my Code: using UnityEngine; using System.Collections; public class Player: MonoBehaviour { public ...
1
vote
1answer
47 views

Instantiation taking too long?

I have a game where there are about 4 empty objects that are my object "spawners". I have two scripts attached to all of them, one that will keep spawning objects from "basictable", and then switch to ...
-2
votes
0answers
16 views

Unity error CS1519 and error CS1525 [on hold]

using UnityEngine; using System.Collections; public class Player: MonoBehaviour { public float maxspeed = 10f; bool facingRight = true; bool grounded = false public Transform ...
1
vote
2answers
89 views

How can I render extremely large models?

I'm trying to build a game in Unity similar to the game Kerbal Space Program where there are large celestial bodies that the player can orbit. I'm running into a few problems though. My first issue is ...
0
votes
1answer
24 views

unity3d - Object keeps falling down

I have an object that moves towards another object using this line : transform.position = Vector3.MoveTowards(transform.position, target.transform.position, speed * Time.deltaTime); this is it's ...
0
votes
0answers
15 views

Create Plane or Quad with size set to fit dynamically-loaded texture

I'd like to load a texture image (at runtime, from web, not stored in Asset folder anywhere) and apply it to a plane (or quad, etc.) so that the plane is the same size, in pixels, as the texture. I'd ...
1
vote
1answer
12 views

Unity Inspector Not Showing Serialized Variables Of Child

So I'm new to using Serialaiziblewtfever(I just cannot remember the correct spelling). In the Unity editor it works fine if I have something like: [System.Seriliabizblewtfever] Public class ...
0
votes
2answers
34 views

I can't add script in unity

I'm a beginner in unity so I got this problem. Here is the script: using UnityEngine; using System.Collections; public class Playercontrol: MonoBehaviour { public float maxspeed = 10f; bool ...
0
votes
0answers
12 views

how to trigger a ball from rotating cube in z axis

how to release ball from the cube which is rotating in z axis, ball should move in Y axis and ball should be reloaded after releasing the ball ?? Thanks in advance cheers Gokul
0
votes
0answers
17 views

Errors Generating A Plane Mesh Using A Script In Unity

In unity I have a script which is attached to a game object with a mesh filter. The purpose of the script is to generate a flat plane of 100x100 vertices. The code for the script compiles in ...
0
votes
0answers
10 views

RenderTexture not working in very specific circumstances (Unity 4.6.3)

I'm building a project in Unity that makes heavy use of RenderTextures and ComputeShaders, and I found out early on that if I tried to open the project in the free version of Unity, I got an ...
1
vote
0answers
18 views

Import Unity 2D objects in Libgdx

I'm using Libgdx to do some simple home projects. I'm trying to make a simple 2D game with Box2d using R.U.B.E as editor. I create a 2d terrain in R.U.B.E now I want to create the terrain texture. I ...
0
votes
1answer
30 views

unity3d - Fire bullet using AddForce is very slow

This is a top-down view but in 3D coordinates, I would like to instantiate and fire a bullet from the player's gun. This script is on a spawner object at the end of the barrel. void Fire () { ...
0
votes
1answer
10 views

Unity Make sprite visible only to shaders

I have made a shader for my UI buttons, the sprites should be black and white, so they can be used as a mask when blending. They should allow for the image behind them to pass through the whiter ...
0
votes
1answer
38 views

UNITY IEnumerator Function

So I am currently using the IEnumerator function to pause a for loop, the for loop that contains a ball that should move to another game object. Currently from my print statements seems like the ball ...
1
vote
1answer
43 views

unity3d - Instantiate and fire bullet realtive to player rotation in 3D

This is a top-down view but in 3D coordinates, I would like to instantiate and fire a bullet from the player's gun. This script is on a spawner object at the end of the barrel. Also tried putting the ...
3
votes
2answers
121 views

How do I create a toggle button in Unity Inspector?

I want to create a tool similar to Unity's Terrain tool, which has some nice toggle buttons in the inspector: How can I achieve similar design to this? I know how to create normal buttons and ...
1
vote
1answer
28 views

main camera not covering whole screen in unity3d

I have been using unity and i got a problem where my main camera is covering only the first half of the floor i made. camera position is left and the floor is rotated ,i m posting an image please help ...
2
votes
2answers
44 views

Updating game objects already placed in scene

I have about 20 game objects placed in certain positions in my scene. I then realized i need to attach two additional game objects to each one of these as children. Is there a simple way of doing ...
0
votes
0answers
57 views

Making a command line in C# [on hold]

I was wondering if there was a way to code a command prompt type thing (CMD) for Unity in C#. I am making a hacking type game and tried but failed.
1
vote
3answers
86 views

How does Unity call “update()” in the scripts?

I understand that you can expose your C++ code to a scripting language such as ChaiScript. From this you can call code that you've made in C++. In Unity, however, they have functions in the script, ...
0
votes
1answer
17 views

Trying to get reference to Button in Javascript Unity3d

I've this simple script in Unity3d: #pragma strict public var topLeft : UnityEngine.UI.Button; public var topCenter : UnityEngine.UI.Button; public var topRight : UnityEngine.UI.Button; public var ...
1
vote
0answers
38 views

Calculate Orbit Path/Ellipse given mass, velocity, and distance (2body)

Calculate and draw the path of an orbit in a 2 body problem given the mass, current velocity, and distance of both bodies? We're working in Unity and will be using the default rigidbody.mass to start ...
0
votes
1answer
45 views

How do I use rigidbody2d.AddForce to apply a force in the direction the object is facing?

I'm trying to create a thruster on a spaceship. It should add this thrust in the direction the thruster is facing, but I am at a loss on how to get that direction and send it to AddForce. Am I even ...
4
votes
1answer
50 views

Why does my Outlined Diffuse 3 shader seem “detached” at a distance?

I'm using the Outlined Diffuse 3 shader from Unity and I'm having a problem with it: the outline looks great when the camera is near the object, but at a distance, it looks detached. From nearby ...
2
votes
2answers
41 views

Unity: Editing a DontDestroyOnLoad object in another scene

I figured out how to make certain objects like my Camera and Canvas persist across scenes, but I can't figure out how to access them in the editor from scenes in which they're not instantiated. I can ...
0
votes
2answers
40 views

How to deactivate a button in unity 3d

We have a set of buttons in our game. Each one corresponds to a particular instrument. we have to implement the foll: a button should become deactivated after being clicked once implying that the ...
0
votes
2answers
35 views

Position child on the edge of the parent circle while scaling unity3d

I have come across to some different situation. I have one circle sprite and i am rotating circle continuously while rotating i want to make circle smaller and larger. I have one object on the edge ...
2
votes
1answer
61 views

Big 2D world Unity3d

I am planning to make a 2d tile based platformer with big world like in terraria. I have some questions to ask on how to manage this big world in Unity3D. The Scenario World Size = 1000 x 1000 = 1 ...
0
votes
1answer
51 views

Unity 5: 3rd Person Controller runs by default. How to change this?

I have been working with the Third Person Controller of the Standard Assets (called Sample Assets in the beta versions) in Unity 5. When the player press the forward button, the character runs by ...
0
votes
1answer
23 views

Button detection in unity3d

we are developing a a game in unity 3D . To play the game we need a number of instruments. we have given a set of buttons to activate the instruments: each button corresponds to a particular ...
0
votes
1answer
32 views

In Unity, what does the camera script's “Behaviour missing” error mean?

I started in Unity few days ago and made a cube with a tank control style. Now I'd like to create controls similar to 3D fighting games (Gunz, Blade Symphony, …): Control body direction with the mouse ...
0
votes
0answers
30 views

Is older tutorials useful for latest unity? [closed]

Will I face any problem if I use the tutorials and books made for unity 3/4 to learn unity 5 with no experience?
0
votes
1answer
39 views

How do I rotate a cube around an axis, relative to the camera view?

I want to be able to rotate a cube, either by dragging vertically to rotate it around the Y-axis, or dragging horizontally to rotate it around the X-axis. However, when the camera is rotated 90 ...
4
votes
0answers
81 views

Liquid 3D Object [closed]

Okey now there is something I have been Struggling with for the past 2 Days, I think I am stupid or something. I need to make a Liquid 3D Object, It is really complicated what I need to make. so I ...
0
votes
1answer
27 views

Unity Issue with Vector3 and Transform

So I am currently running into this error Cannot implicitly convert type 'UnityEngine.Vector3" to 'Unity.Engine.Transfomr' I am not to sure on how to fix this issue because I am very confused on ...
0
votes
1answer
287 views

In a List, how to set an element to true and the rest of element to false? [closed]

I have this List of character objects. I would like to make so that every time I select a character, the game deselect all other character. In this character class I have a variable called selected ...
0
votes
2answers
84 views

Creating a Timer in C# Unity

In my game I have watch video earn coins system, now I want to program a delay so the user cant watch the video every 5 seconds, for example I want to let him watch every 6 hours, but I'm not sure how ...
4
votes
5answers
432 views

How to Color.Lerp between multiple colors?

I have found it rather difficult to find a solution to this in the Unity documents. Color.Lerp(Color a, Color b, float t) is a function that gradually changes a color according to a step t, giving it ...