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.

Unity logo

Unity is a game engine, IDE and service suite developed by Unity Technologies. As of 2016 it is the most widely-used game development system.

It targets mobiles, desktops, consoles, web browsers, and VR devices. Unity is used for 3D, 2D and VR/AR. Cloud services include advertising, in-app purchase, and cloud building. The Unity application itself is for both Windows and macOS.

In Unity, components are written in C# and are usually compiled using Mono or IL2CPP.

Major subsystems include PhysX game physics, Mecanim animation, a third-party asset store, and Unity.UI.

Note that although "Unity" is the product name and "unity.com" is the web site, on stackoverflow.com "unity-game-engine" is the tag for Unity.

Latest release: Release 2022.2.9 released on the 3rd of March 2023.

The latest update supports development for the following:

Mobile

  • iOS
  • Android

VR and AR

  • Oculus
  • Google Cardboard
  • Steam VR
  • PlayStation VR
  • Gear VR
  • Microsoft Hololens
  • Daydream
  • Apple ARKit
  • Google ARCore
  • Magic Leap
  • Vuforia

Desktop

  • Windows
  • Universal Windows Platform
  • macOS
  • Linux / Steam OS
  • Facebook Gameroom

Console

  • PlayStation 4
  • Xbox One
  • Nintendo Switch
  • Nintendo 3DS family of systems

Web

  • WebGL

Smart TVs

  • Android TV
  • Apple TV
  • tvOS

Useful links


Related tags

75302 questions
6
votes
4 answers

preload textures in unity3d

I am modifying a material, that is applied to an object, by changing its texture but the problem is that i get some lag while doing this. How can i preload some textures in memory to avoid temporal lag in unity3d?
Alex
  • 10,869
  • 28
  • 93
  • 165
6
votes
4 answers

Open device camera for iPhone and Android in Unity3d

I am working an application in which i need to open device camera in full view and i am making this app for both iOS and Android. So can any one tell me that how can i open full screen device camera in Unity for all devices Android and iPhone. This…
josh
  • 1,681
  • 4
  • 28
  • 61
6
votes
3 answers

Unity Serializable Class Custom Inspector

I have a very simple class in unity, UnitRange (which has a minimum and a maximum range). [System.Serializable] public class UnitRange { public int Minimum; public int Maximum; } And this shows up in the inspector (if I make a public…
The Oddler
  • 6,314
  • 7
  • 51
  • 94
6
votes
2 answers

Fast way to set byte array to unity texture2d

In unity3d I get image from camera (color camera device) as byte array from a plugin , and I want show image in real-time in screen . If i use Texture2D.SetPixels32 for making a texture, it decrease fps dramatically ( from 80 to 10). //First…
mX64
  • 388
  • 1
  • 7
  • 24
6
votes
3 answers

DllNotFoundException: libzmq

I'm trying to use ZeroMQ C#-binding ( http://www.zeromq.org/bindings:clr ) for communicating with a server for a game I'm creating in Unity (I'm using Mac OS X 10.8). I therefore created a simple function that connects to a server, sends a message…
6
votes
2 answers

lowering draw calls by not drawing things that are not visible

I was searching for methods to optimise my game. I was thinking if there is a way to not draw the objects that are in the camera view but are not visible to the viewer? The thing is that i need to lower my draw calls and at any given time, there…
Alex
  • 10,869
  • 28
  • 93
  • 165
6
votes
1 answer

UNITY3D: Change player control to a target model (FPS)

I am developing a small game prototype in Unity 3.5.5f - in which the player controls a small mind controlling alien. The player needs to be able to take control of a target human NPC, switching all camera and controls to the human in question. N.B.…
Vikram Saran
  • 1,143
  • 8
  • 17
6
votes
2 answers

How does Unity JS have a class?

I was reading an article on Unity JS. The article showed an example of a class in unity js. class Person{ var name; var career; } //Create objects of type Person var john = Person(); john.name = "John Smith"; john.career =…
Moon
  • 22,195
  • 68
  • 188
  • 269
6
votes
6 answers

Move Camera Over Terrain Using Touch Input in Unity 3D

I am new to Unity and I am trying to figure out how to move the camera over a map/terrain using touch input. The camera would be looking down at the terrain with a rotation of (90,0,0). The terrain is on layer 8. I have had no problem getting it…
Rodney S. Foley
  • 10,190
  • 12
  • 48
  • 66
6
votes
1 answer

What screen size to use in Unity3d for I phone and iPad

I am trying to create a game for iPhone, iPad and Android in unity3d. The camera is looking top down. I have created a plane with texture of the ground. Now I want to place the camera such that the game area acquires full screen on the iPhone. Say…
ila
  • 920
  • 12
  • 35
6
votes
1 answer

Deploy Unity3D in Windows Azure

I'm a bit stuck with the windows Azure plateforme. For now, I have a ASP.NET MVC 3 Web role running on Azure. But I want to deploy a Unity3D Web Player Application. How can I perform this task. I think it's quite the same if I want to deploy a flash…
MaT
  • 1,556
  • 3
  • 28
  • 64
6
votes
1 answer

Interop causes Unity to crash

is it possible at all to make C/C++ function callback into Unity scripts, provided that you can create a new thread from the scripts? I tried but Unity crashes as soon as the scripts get executed. I googled about it and found this thread which…
CherryQu
  • 3,343
  • 9
  • 40
  • 65
6
votes
2 answers

How to manage a buffer between C and C#

Problem I have a C# script that calls C functions via System.Runtime.Interop. I managed to invoke C functions, but I have problem managing a buffer between C and C#. In my situation C is the (data) producer and C# is the consumer. My problem is…
CherryQu
  • 3,343
  • 9
  • 40
  • 65
5
votes
1 answer

Unity3D C# calculate correct forward after rotation

I'm starting my development using Unity. I'm doing something like that: if(Input.GetKey(KeyCode.A))newValues[1]-=this.turnSpeed*(float)Time.deltaTime; if(Input.GetKey(KeyCode.D))newValues[1]+=this.turnSpeed*(float)Time.deltaTime; …
Lefsler
  • 1,738
  • 6
  • 26
  • 46
5
votes
3 answers

Why does 0.5 rounded with MidpointRounding.AwayFromZero result in 0?

Why does this result in 0 and not 1? Math.Round(0.5, 0, MidpointRounding.AwayFromZero) Here's an example: http://ideone.com/ayMVO
Acorn
  • 49,061
  • 27
  • 133
  • 172
1 2 3
99
100