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 (2)

0
votes
0answers
2 views

2D Collide and Bounce in Unity, using Lerp

First of all, I'm a complete beginner in Unity and game development in general. I'm tying to make my first game as simple as possible. I have a player object, a green circle with Circle Collider and ...
0
votes
0answers
7 views

Unity: How to cut a line (or curve) at a specific point and animate it?

What would be a good approach to cut a line (or curve) at a specific point (let's say we use the mouse pointer to detect the position of the cut). The curves you see in the image above, are Bezier ...
0
votes
0answers
8 views

how to connect unet to my own host

I have make this Game. And now I Want to Connect it to my own Host. How should I do it? How can I Connect this Game to my Host? I can do PHP and JSON if it Need.
0
votes
1answer
22 views

Problem with wheelcollider on bike game

I have a problem with my first test on Unity, it's a simple motorcycle game. I found a script to start learning and runs very good, is this ("answers.unity3d.com/questions/528298/bike-physics.html). ...
0
votes
0answers
19 views

Move UI element towards direction it is facing

I have a text element which is rotated by some degrees. I want to move that towards the direction it is facing by some units in code. This is what it looks like: I want to move it a few units ...
1
vote
1answer
32 views

How to load values into a script from a file?

I have a prefab of a "generic unit;" each one has a script with some public variables: name, health, and attack. Currently, I am manually making copies of that prefab and editing their names, health ...
0
votes
0answers
20 views

Can I make and test PS Vita games without registration?

I am currently not registered as a Playstation Developer at the moment, but I have emailed Sony in the mean time to ask how a single person can register as an Indie Developer to publish. But can I ...
0
votes
1answer
72 views

How should I store trading cards?

I'm working on a Magic-esque TCG in Unity. Currently, the cards themselves are all prefabs: I have a Satyr Archer prefab, a Candle Wisp prefab, etc. This works fine for now, since I only have a few ...
0
votes
1answer
22 views

Unity: OnTriggerEnter2D does not get called when using Raycast

In a previous post I talked about creating wires (using Bézier curve) using LineRenderer. I am using a PolygonCollider2D to wrap the wire (see below): GameObject wire = new GameObject (); ...
0
votes
0answers
7 views

Unity - Translate get axis to proper touch control system

The player in my game moves on the horizontal axis only. So far it's moving via left/right arrows that pass Input.GetAxis("Horizontal") to my MovePlayer() function. It's a mobile game so I'd need to ...
1
vote
0answers
30 views

Unity animation skips first loop

I have my player's animation controller managing two simple states: idle-walk. States are switched via bools and everything works fine aside from the fact that the idle state doesn't render the first ...
0
votes
0answers
36 views

360 degree viewer for AR

I want to implement a 360-degree viewer for Augmented-Reality in Unity. Augmented-Reality means in this case, that I want to place an image like an interface mockup in my viewer which has transparency....
0
votes
0answers
11 views

Texture shader which renders the inside of the object and also uses alpha of the texture

I got the following shader working, which renders my texture from inside of the object : Shader "Custom/InnerRendering" { Properties { _Color ("Color", Color) = (1,1,1,0.5) ...
1
vote
2answers
40 views

Why does the following code print logs even after the game object is detroyed?

I have the following in a script attached to a game object in a unity scene. When I run this scene and press 'E', I get the following logs. (The game object is destroyed too) In destroy After destroy ...
2
votes
1answer
64 views

How to make enemies randomly choose a path and then come back if wrong one?

So I'm making a 2D Tower Defense-game in Unity with C# where the enemy has to go to the base, but can go to the wrong path randomly and then turns around when the road ends. How can I achieve this?
0
votes
0answers
27 views

Using Steering Wheel in Unity

Is there any way to use a steering wheel in Unity? All I find online is people with the same problem. The numbering on the axis are not the same as with keyboard input. In some cases left is 1 and as ...
0
votes
2answers
34 views

Pause a Coroutine while it's waiting for seconds

I have a Coroutine (X) that waits for seconds before it does something. However, during that time there is another Coroutine that may trigger (Y), and during the time it's on X has to pause waiting ...
0
votes
1answer
30 views

Unity2D - How to destroy my Instantiate particle system

I'm having trouble trying to destroy my Instantiated particle system, I can only destroy my gameobject using UnityEngine; using System.Collections; public class meteor_destruction : MonoBehaviour { ...
0
votes
0answers
27 views

How can I create an on-screen joystick for a PC-to-Android port?

I made a simple 2D game for PC(because I am a beginner and wanted to learn the basics of creating a game for PC first) that i want to port to Android.I think all that i would need to do is change the ...
0
votes
0answers
15 views

Unity or Cocos2D for a turn-based strategy and an isometric management game? [on hold]

Me and some friends are working on a 2D turn-based strategy game similar to Fire Emblem. Also, as a side or a future project, we could be working on an isometric management game. I'd like to know ...
0
votes
1answer
23 views

WWW(Unity) with HTTPS on Android not working

I'm using a native android plugin my team made for communication with a server, and as it uses HTTPS I use a certificate with it. Everything's fine with that, the problem is that, in Unity, when I try ...
3
votes
1answer
54 views

Unity: What type of Collider should I add to a LineRenderer?

I am currently building a game where I need to generate some wires (as Bézier curves) using LineRenderer. After changing the width of each line lineRenderer.SetWidth (0.15f, 0.15f); I am attaching ...
0
votes
0answers
43 views

Sprite always starts flipped

Everytime I start the game, or I swap animator controllers in the inspector (in runtime), the character is flipped in X axis until I start moving him. How do I prevent this to happen? This happens to ...
2
votes
3answers
47 views

Finding Object by scene loaded? (LoadSceneMode.Additive)

I learned how to Load and unload scenes in unity. using LoadSceneMode.Additive. I like to spit up my scenes as much as possible and retain the stuff I need as I go along. I'd like to be able to find ...
1
vote
1answer
29 views

Camera Preview while the camera is not selected

When I select the Camera object, I see the border-lines, the near clipping Plane and the camera Preview. Now I would like to see all those things when I select another GameObject (still the lines ...
0
votes
2answers
59 views

Why does accessing ParticleSystem.IsAlive() raise this error?

I am trying to record if my particle system IsAlive with: GameObject prefab = Instantiate (Prefab, myPosition, Quaternion.identity) as GameObject; Component ps = prefab.GetComponent<...
-4
votes
1answer
58 views

camera following player

this code is for camera follow player: using UnityEngine; using System.Collections; public class cameraMovement : MonoBehaviour { public GameObject player; private Vector3 pos; ...
0
votes
1answer
36 views

Why object spawn duplicate and double sides.?

I have a script, I am using this script to instantiate new path and also wall (as border) to generate new path and wall. Before some time all scripts work fine. but at this time my player enter in ...
0
votes
0answers
15 views

How to use OpenCV/EmguCV with Unity3d

I am beginners to OpenCV and want to use with Unity3d. I found different costly packages at asset store but i can't use it i.e., I want to try it myself and found EmguCV that provide openCV wrapper in ...
-1
votes
1answer
56 views

car movement problem

i have use simple C# code for my car move. this: using UnityEngine; using System.Collections; public class mov : MonoBehaviour { void Update() { var x = Input....
0
votes
0answers
29 views

Unity Android Build failed after adding admob

I am using Unity 4.7.1 and Google Mobile Ads Unity Plugin v3.0.5 After adding google abmob plugin , i cant take build . Following error is showing Error building Player: CommandInvokationFailure: ...
0
votes
2answers
32 views

Rotate character 180 degrees determine direction

In my game it should be possible to rotate the character 180 degrees. I always want the character to rotate clockwise. If the character is rotated 0 degrees and I press the rotate button, the ...
0
votes
0answers
10 views

File transfer between Unity clients [Photon]

I'm working on a project using Photon PUN for the multiplayer (using Photon Cloud servers provided from Photon) To provide context, i have player customizable graphics (which are kept locally - think ...
1
vote
2answers
54 views

How to have an AI controlled GameObject naively avoid another one?

I have an idea of an AI controlled game which the gameobject will follow a path but it will change its path if I put another gameobject in front of it. For instance, if the moving game object is ...
0
votes
1answer
33 views

Unity detecting edge of mesh or end of mesh

I'm trying to create procedurally generated tiles and I've reached a point where I need to figure out the boundaries of the mesh or the outer vertices of the mesh. RaycastHit hit; if (...
1
vote
1answer
24 views

Unity - How to serialize / show private fields and custom types in Inspector?

By default, Unity only serializes public fields. How can I serialize private fields and custom types to show them in inspector?
-4
votes
0answers
48 views

How to make a cleaning like dumb ways to die cleaning a vomit in unity for Android [on hold]

How can i make a dumb ways to die like game? The cleaning of vomit part. https://youtu.be/DOXMzqHqNwQ?t=91
-1
votes
0answers
38 views

What are the “hidden” limitations of Unity Plus compared to Unity Pro? [on hold]

Unity recently announced their new plans, which comprise of Personal/Plus/Pro/Enterprise. The scope of this question is to compare (carefully) the differences between the Plus and Pro licenses only, ...
-1
votes
1answer
23 views

Unity: Build on specific wall of the box

I'm trying to program game similar to Minecraft - you build environment from cubes. So far I found that Unity has a function which tells if mouse is over a box collider. I need a function which will ...
1
vote
1answer
48 views

Swipe Detection with mouse in Unity

This is my swipe detection code. This code uses touch input. I want to do this using the left mouse button. So basically I want to 'swipe' using the mouse.How can I achieve that? public float maxTime;...
1
vote
2answers
65 views

Unity / How to Hide “Editor Script” in the Inspector?

I want to hide the "editor Script" in the Unity Inspector, so it doesnt show up with all the other components (transform/other scripts etc.) It works with every other "normal" component like this: ...
1
vote
0answers
37 views

Unity won't compile project successfully

I am trying to build the project into a Web GL, but it throws 3 errors when it reaches the "Building additional assets" stage. Error 1 Building - Failed to write file: resources.assets ...
-3
votes
0answers
48 views

First person bullet not shooting

Instead of spawning from the barrel the bullet just appears about halfway down my gun and just sits mid air? #pragma strict var PrefabBullet : GameObject; var speed = 100; function Update() { if(...
1
vote
1answer
66 views

How do you render planets without distortion?

I've recently been working on a little spaceship flying sim in Unity and want to add planets. Up till now, I've been hand modeling them in Blender. But I want to have a way to generate large planets ...
0
votes
1answer
56 views

Can I use Unity remote with a Android emulator instead of Android phone?

Unity Remote is good app. It allows to connect with Unity while you are running your project in Play mode from the editor. But what if I want to test game but I don't have an Android phone? Yes, it ...
1
vote
0answers
33 views

Unity example project error

I just downloaded last version of Unity and it assets. But when I try to play example projects I get error! Unable to parse YAML file: [Control characters are not allowed] at line 0 Assets/Standard ...
-3
votes
3answers
61 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.
3
votes
2answers
41 views

Unity Animation Tracking

Background I've recently reached a bottle neck in my game's code that forced me to completely decouple the logic/networking from the graphics. Thanks to the nature of my board game, I was able to ...
-1
votes
0answers
28 views

Which is better between animaion and Script for rotation

To Rotate a particular object in unity, which way is better? Rotating it by animation or by applying rotation from script.
0
votes
0answers
59 views

How to keep my player in center of path.?

I want to keep my player in center of the path. I have different paths like strait and 90 degree rotated. I want keep my player moving in center in center like temple run also when I rotate my player ...