Skip to main content

Questions tagged [unity-game-engine]

Unity is a cross-platform game engine by Unity Technologies. Questions should be about programming with the game engine and not usage of the graphical interface. Questions about the usage of the graphics interface are off topic.

572 votes
18 answers
269k views

How to use Git for Unity3D source control?

What are best practices for using Git source control with Unity 3D, particularly in dealing with the binary nature of Unity 3D projects? Please describe the workflow, what paths would be included in ....
PressingOnAlways's user avatar
374 votes
37 answers
552k views

Unity Scripts edited in Visual studio don't provide autocomplete

When I want to edit C# Unity scripts, they open in Visual Studio. It is supposed to provide auto complete for all Unity related code, but it doesn't work. Here you can see the missing functionality: ...
CorbenDalas's user avatar
  • 3,903
187 votes
2 answers
138k views

How to prepare a Unity project for git (step-by-step)? [duplicate]

What are the detailed steps necessary to prepare a Unity project for committing to a git repository eg. github? I don't want to store unnecessary files (specially temp files and avoid binary formats ...
German's user avatar
  • 10.3k
158 votes
8 answers
93k views

How does StartCoroutine / yield return pattern really work in Unity?

I understand the principle of coroutines. I know how to get the standard StartCoroutine / yield return pattern to work in C# in Unity, e.g. invoke a method returning IEnumerator via StartCoroutine ...
Ghopper21's user avatar
  • 10.4k
144 votes
11 answers
288k views

Serialize and Deserialize Json and Json Array in Unity

I have a list of items send from a PHP file to unity using WWW. The WWW.text looks like: [ { "playerId": "1", "playerLoc": "Powai" }, { "playerId": "2", "...
dil33pm's user avatar
  • 1,613
128 votes
8 answers
184k views

what is the difference between Update & FixedUpdate in Unity?

What is the difference between the Update and FixedUpdate methods, and when should these methods be used?
Kapil11's user avatar
  • 1,435
113 votes
4 answers
155k views

How to detect click/touch events on UI and GameObjects

How to detect UI object on Canvas on Touch in android? For example, I have a canvas that have 5 objects such as Image, RawImage, Buttons, InputField and so on. When I touch on Button UI object Then ...
Dennis Liu's user avatar
  • 2,318
103 votes
11 answers
439k views

How to make the script wait/sleep in a simple way in unity

How can I put a sleep function between the TextUI.text = ...., to wait 3 seconds between each phrase? public Text GuessUI; public Text TextUI; [...truncated...] TextUI.text = "Welcome to Number ...
DiogoSaraiva's user avatar
  • 1,605
99 votes
6 answers
194k views

How to pass data (and references) between scenes in Unity

How can I pass score value from one scene to another? I've tried the following: Scene one: void Start () { score = 0; updateScoreView (); StartCoroutine (DelayLoadlevel(20)); } public ...
Mina Fawzy's user avatar
  • 21.3k
99 votes
1 answer
6k views

Marching Cubes - generating holes in mesh

I'm working on a Marching Cubes implementation in Unity. My code is based on Paul Bourke's code with a lot of modifications. I'm checking if a block at a position is null, and if it is, a debug ...
Statey's user avatar
  • 1,101
91 votes
1 answer
372k views

"A namespace cannot directly contain members such as fields or methods" [closed]

I am trying to use this code for NET.reflector using Reflexil. I am trying to replace code with this: if(Input.GetKeyDown(KeyCode.Keypad5)) { int i = 0; Character localPlayer = PlayerClient....
user3204732's user avatar
91 votes
5 answers
82k views

Awake() and Start()

I see that we can initialize Variable in Awake() or Start() and Awake() will be called before Start(). When should we initialize in Awake and Start to have the best performance?
mdtuyen's user avatar
  • 4,508
86 votes
11 answers
124k views

not finding android sdk (Unity)

Error: Invalid command android UnityEditor.HostView:OnGUI() CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more ...
Salman Khan's user avatar
85 votes
12 answers
143k views

What Language is Used To Develop Using Unity

What language does one need to use when programming with Unity? Or is it an API for many languages? I read through the docs and I guess I missed the point on the language used. It says it has iOS ...
some_id's user avatar
  • 29.7k
83 votes
1 answer
3k views

How to resolve SmartFoxServer connection error in unity

I'm using SmartFoxServer API on Unity3d. It was working fine before I recovered my MacBook, but now gives a connection error as below: Http error creating http connection: System.Net.Sockets....
Muhammet Demir's user avatar

15 30 50 per page
1
2 3 4 5
5134