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
1 answer

How to ask webcam to auto focus with Unity3D

Currently, I am working on some Augmented Reality mobile app with Unity3D. The performance is impacted by the image quality. Is there some way to ask webcam to auto focus with Unity3D?
flyzhao
  • 348
  • 4
  • 15
6
votes
1 answer

Why do I need depthBuffer to use RenderTexture?

I think that I don't quite get the Unity rendering engine. I use RenderTexture to generate the screenshot (I need to manage it later on): screenshotRenderTexture = new RenderTexture(screenshot.width, screenshot.height, depthBufferBits,…
Max Yankov
  • 12,551
  • 12
  • 67
  • 135
6
votes
4 answers

How is Vector3 implemented, why are the properties readonly?

Vector3 v = new Vector3(1, 1, 1); v.x = 5; Why can't I do this? I have to do v = new Vector3(5, v.y, v.z); I assume the reason behind this is for performance. But I can't guess at why this is necessary. Edit: I lied, this actually does work. The…
Farzher
  • 13,934
  • 21
  • 69
  • 100
6
votes
1 answer

Include custom Activity inside of Unity Android Plugin (Without overriding UnityPlayerActivity)?

I am trying to write an Android Plugin for Unity3D to interface with the Google Play In App Billing. I am aware that there are existing plugins out there for this, but I wish to do it on my own. It appears that I need to catch Android's…
Matt Hoffman
  • 61
  • 1
  • 2
6
votes
2 answers

Orthographic camera zoom with focus on a specific point

I have an orthographic camera and would like to implement a zoom feature to a specific point. I.e., imagine you have a picture and want to zoom to a specific part of the picture. I know how to zoom in, the problem is to move the camera to a position…
Alex
  • 10,869
  • 28
  • 93
  • 165
6
votes
1 answer

two way communication between unmanaged code and unity3d code

I have two apps. One of them is written in visual c++ and the other is a unity app, both are running on windows. In my scenario, I want to call a unity function and draw an object whenever user presses on a button in my c++ app. So far, I have tried…
okante
  • 97
  • 2
  • 11
6
votes
4 answers

Instantiate and Destroy Unity3D

I need to instantiate and destroy a prefab on the run. I tried these: public Transform prefab; //I attached a prefab in Unity Editor Object o = Instantiate(prefab); //using this I cannot get the transform component (I don't know why) so…
Temp Id
  • 387
  • 3
  • 9
  • 15
6
votes
2 answers

How to dynamically invoke delegates with known parameter base type?

I am trying to implement my own messaging system for a Unity game. I have a basic version working - a very simplified example of this is as follows: // Messaging class: private Dictionary>> listeners; // Set up by…
Paul
  • 63
  • 4
6
votes
2 answers

Unity 3D: Asset Bundles vs. Resources folder vs www.Texture

So, I've done a bit of reading around the forums about AssetBundles and the Resources folder in Unity 3D, and I can't figure out the optimal solution for the problem I'm facing. Here's the problem: I've got a program designed for standalone, that…
Catlard
  • 853
  • 6
  • 13
  • 30
6
votes
6 answers

xCode will not parse project from Unity

I am working on a different iOS project in Unity and I have built it by exporting to Xcode (like I always have). Whenever I try to open the "Unity-iPhone.xcodeproj" in Xcode, it gives me the following error: Project cannot be opened because the…
freddrock
  • 171
  • 1
  • 3
  • 10
6
votes
5 answers

Stay on Moving Platforms

I'm writing a 2D Platformer in Unity and I'm trying to get the player to stay on a moving platform. I've done searching and tinkering for a day or two now, and I'm not having any luck. Basically, I've been told to try to keep the character moving…
muttley91
  • 12,278
  • 33
  • 106
  • 160
6
votes
2 answers

How to be notified o a Component or child GameObject has been added to a GameObject

Is there anyway I can be notified (possibly through some method/event raised) when a Component is added to a GameObject (and even child GameObject)? I'd like to be notified(possibly in some editors scripts) when some events occurs in the editor for…
Heisenbug
  • 38,762
  • 28
  • 132
  • 190
6
votes
4 answers

Unity3D: Strange 1 pix white line between tiles on my 2D game

My game have a tiled 2d map. This is a scene screenshot: I found when I move the camera vertically, there are strange white lines randomly appeared between randomly tiles, See: I don't know why.... PS: This is a pixel style 2d game, so my…
Zephyr Zhang
  • 85
  • 2
  • 6
6
votes
2 answers

Get string representing the expression used as function argument in C#

I'm developing for Unity3D using C#, and decided it would be useful to have an assert function. (In Unity3D, System.Diagnostics.Debug.Assert exists, but does nothing.) As a developer that works primarily in C++, I'm used to assert messages that…
Zach
  • 356
  • 3
  • 9
6
votes
4 answers

panel hide and show in NGUI

I am new to NGUI and unity 3d. I have two panels in a ui root. its named as firstPanel and secondPanel. secondPanel is deactivated in scene. In firstPanel i have so many buttons and one is a play button, that is image button. While Clicking on…
Sona Rijesh
  • 1,041
  • 7
  • 32
  • 62
1 2 3
99
100