U

Unity FAQ

47 questions that each have a pile of threads on Unity's official forum, answered here in full. Each one points to where the long version lives — a guide when it is a recipe, a lesson when it is a stage of the course.

01

How do I make a character move?

Pick one of three, never two: CharacterController for a player you control directly, Rigidbody for anything physics should push around, and transform.Translate only for things that do not collide. Multiply every speed by Time.deltaTime or the game runs faster on a faster machine.

Guides · 17.09.2026Moving a character: which of the three ways is yours8 min →
02

How do I make the character jump, and stop it jumping in mid-air?

Jumping is one line; the hard part is knowing when the feet are on something. Check a small sphere just below the character against a Ground layer, and only allow the jump when that check returns true. Never test whether vertical velocity is zero — it is zero at the top of the arc too.

Guides · 17.09.2026Jumping, and the ground check that makes it work9 min →
03

How do I rotate an object, and what is a Quaternion?

Use Quaternion.Euler(x, y, z) when you know the angle you want, and Quaternion.LookRotation with RotateTowards or Slerp to turn towards something. Never add to transform.rotation directly: it holds four numbers that are not angles, and writing angles into it produces nonsense.

Guides · 17.09.2026Rotation: Euler angles, Quaternions, and which one you may touch11 min →
04

How do I make the camera follow the player without jitter?

Move the camera in LateUpdate, never Update: LateUpdate runs after everything else has moved, so the camera reads a position that is already final. If the player uses a Rigidbody, also set the Rigidbody's Interpolate option to Interpolate — physics ticks at a different rate from your frames.

Guides · 17.09.2026A follow camera that does not stutter8 min →
05

How do I detect what the player is aiming at or standing on?

Physics.Raycast fires an invisible line and reports the first collider it meets, with the point, the distance and the surface normal. Always pass a LayerMask and a maximum distance — without them a ray tests every layer out to infinity, and one fired from a third-person camera hits the player standing in front of it first.

Guides · 17.09.2026Raycasts: asking the world what is in front of you10 min →
06

How do I spawn objects from code?

Make the thing a prefab, hold a reference to it in a public field, and call Instantiate(prefab, position, rotation). Drag the prefab from the Project panel into that field — dragging the copy that sits in the Hierarchy instead is the mistake behind half of all spawner bugs.

Guides · 17.09.2026Instantiate: spawning prefabs, and reusing them9 min →
07

How do I make something happen over time, or wait before it happens?

A coroutine is a method you can pause: yield return new WaitForSeconds(1f) waits a second and then carries on from that same line. Start it with StartCoroutine, keep the handle if you will ever need to stop it, and remember that a coroutine stops when the GameObject running it is deactivated or destroyed.

Guides · 17.09.2026Coroutines: doing something over time without an Update10 min →
08

How do I make the UI fit every screen size?

Set the Canvas Scaler to Scale With Screen Size with a reference resolution, then anchor every element to the corner or edge it belongs to rather than leaving it anchored to the centre. On a phone with a notch, fit a full-screen parent to Screen.safeArea so nothing important ends up under the cutout.

Guides · 17.09.2026UI that fits every screen, notches included11 min →
09

How do I save the player's progress?

Use PlayerPrefs for a handful of settings, and a JSON file under Application.persistentDataPath for anything that is really game state. Write the file in OnApplicationPause as well as OnApplicationQuit — on a phone, Quit often never runs.

Guides · 17.09.2026Saving progress: PlayerPrefs, JSON, and when each is right9 min →
10

How do I build an APK and get it onto an Android phone?

Install the Android Build Support module, switch the platform to Android, set a package name of your own, and build. What stops most first builds is an SDK or JDK path Unity cannot find; what bites later is shipping the default com.DefaultCompany package name, because a package name can never change once the app is on Google Play.

Guides · 17.09.2026From project to APK on a real phone10 min →
11

Why does my character fall straight through the floor?

Four causes, in the order worth checking: the floor has no Collider; one of the two Colliders has Is Trigger ticked; the object moves far enough in one physics step to skip past a thin floor, which a Plane always is; or the two layers are unticked against each other in the Collision Matrix. With a CharacterController there is a fifth: moving it through transform.position instead of Move() skips collision entirely.

lessonYour first scene: a flat 3D floorBasics →
12

What does NullReferenceException mean?

You used a variable that is empty. Double-click the red line in the Console and it opens the exact line that threw; on that line, something to the left of a dot is null. The usual culprit is an Inspector slot nobody dragged anything into, which shows as None and behaves as null.

lessonClass = componentBasics →
13

Why is my public variable not showing in the Inspector?

Check the Console first: while any script in the project fails to compile, Unity keeps running the last version that compiled, so the field you just added is in your file but not in the version Unity is running. Otherwise the class name does not match the file name exactly, or the type is one Unity cannot serialise — a Dictionary, an interface, or a property with get and set.

lessonClass = componentBasics →
14

Why is OnTriggerEnter never called?

Four things must all be true: at least one of the two objects has a Rigidbody, at least one of the two colliders has Is Trigger ticked, the method is spelled exactly OnTriggerEnter with a Collider parameter, and the two layers are enabled against each other in the Collision Matrix. A CharacterController is the exception to the first rule: it fires trigger messages without a Rigidbody, as long as you move it with Move().

Guides · 20.09.2026Collisions and triggers: why the event never fires9 min →
15

How do I switch to another scene?

Add every scene to the Scene List in File > Build Profiles, then call SceneManager.LoadScene with its name. The swap happens on the next frame, everything in the old scene is destroyed, and only root objects marked DontDestroyOnLoad survive — along with static fields and Time.timeScale, which nothing resets for you.

Guides · 20.09.2026Switching scenes: LoadScene, loading screens and what survives10 min →
16

What is a singleton, and how should a GameManager be written?

A singleton is one live object with a static field pointing at it, so any script can call GameManager.Instance without holding a reference. Set that field in Awake, read it in Start, destroy the second copy a scene reload brings in, and only call DontDestroyOnLoad when the manager really has to outlive the scene.

Guides · 20.09.2026Singletons: one GameManager the whole game can reach9 min →
17

What is a prefab in Unity?

A prefab is a GameObject saved as a file in the Project panel; the copies in your scenes all follow it, so editing the file changes every one of them. Edit a copy instead and the change is an override on that copy alone — shown in bold, with Apply All and Revert All in the Overrides dropdown.

Guides · 20.09.2026Prefabs: the file, the copies, and the edits in between8 min →
18

Why does my phone say the app was not installed?

Almost always a signature clash: that package name is already on the phone from a build signed with a different debug key. Run adb uninstall com.yourstudio.yourgame, then install again — the save data on the device goes with the old copy.

Guides · 22.09.2026APK won't install on Android: every message explained11 min →
19

There is a problem parsing the package — what does it mean?

The installer could not read the APK at all: it was truncated or renamed in transfer, a .aab was renamed to .apk, Minimum API Level is above the device, or an ARM64-only build went onto a 32-bit phone. Compare the byte count against the file on your PC first, because it takes ten seconds.

Guides · 22.09.2026APK won't install on Android: every message explained11 min →
20

Why does my Unity game crash the moment it opens on Android?

Run adb logcat -s Unity and start the game: the reason prints within seconds, and a stack trace naming a file and a line is your own C# — usually a scene left out of Build Profiles or a reference never set in the Inspector. If no Unity line appears at all, rebuild with Managed Stripping Level on Minimal, because IL2CPP may have deleted a type only reflection reaches.

Guides · 22.09.2026APK won't install on Android: every message explained11 min →
21

Why is my Unity game a black screen on Android but fine in the editor?

Because the phone boots the scene at index 0 of Build Scenes, not the one you happen to have open, and a scene missing from that list is not shipped at all. Your LoadScene call then fails as one line of log and the menu it was supposed to replace stays half destroyed. Check the list before any render setting, and let adb logcat name it.

Guides · 22.09.2026Black screen on a phone while the editor runs fine12 min →
22

The screen is black but I can hear the game running. What is it?

The logic is alive and only the picture is missing, so it is either a camera with nothing to render or UI painted over everything. Uncheck the Canvas and build once: a world appearing means the UI was the lid. If nothing changes, set Clear Flags to Solid Color with a loud background colour and build again — magenta means an empty camera view, black means no enabled camera in that scene.

Guides · 22.09.2026Black screen on a phone while the editor runs fine12 min →
23

Materials go pink on the phone instead of black — same problem?

Same family, different failure. Pink means no subshader in that file supports this platform, so Unity paints its error material instead; black means the shader was accepted and the variant you needed at that moment was stripped out or refused by the driver. Turn off Auto Graphics API and test OpenGLES3 without Vulkan before you touch any material.

Guides · 22.09.2026Black screen on a phone while the editor runs fine12 min →
24

My Unity CharacterController won't move. Where do I start?

Attach one temporary script that logs the input vector once a second, then press Play and hold W. Numbers appear: the input is fine and the usual culprit is a speed field left at 0, because public float speed; has no default. No numbers: the script is not running — object inactive, component unchecked, or the project uses the new Input System while the code calls Input.GetAxis.

Guides · 22.09.2026CharacterController won't move: seven checks, cheapest first12 min →
25

Why does my character crawl at almost zero speed?

Two shapes: a speed of 0.001 instead of 6, which is one millimetre per second, or deltaTime divided instead of multiplied, or left out entirely. Move() takes metres for this frame, so a speed in metres per second must be multiplied by Time.deltaTime. Drop deltaTime and the same character becomes frame-rate dependent — twice as fast on a 120 Hz phone.

Guides · 22.09.2026CharacterController won't move: seven checks, cheapest first12 min →
26

The character rotates but never walks forward — why?

Rotation ignores scale, forward motion does not, so check the Transform's scale and every parent's: 0 on any axis or a negative mirror value leaves the CharacterController's capsule with no volume, and a scaled root stops Move where the maths expects it to continue. Unity wants 1, 1, 1 on that Transform — set model size on the importer's Model tab instead.

Guides · 22.09.2026CharacterController won't move: seven checks, cheapest first12 min →
27

How long does it take to learn Unity and make a game?

This course is 40 lessons and 447 minutes of them, or 7.45 hours. Doing the five exercises as their own briefs ask — 60–90 minutes, then 3–4, 2–3, 3–4 and 3–5 hours — puts the honest total at 18–23 hours, which is 35–46 sessions of 30 minutes, so one to two months of daily half hours.

Guides · 22.09.2026How long does Unity take to learn? The course's own numbers11 min →
28

Is 30 minutes a day enough to learn Unity?

It is enough for one lesson: the average is 447 ÷ 40 = 11.2 minutes, and the lessons alone come to 447 ÷ 30 = 14.9 sessions, so about two weeks if you study every day and three at five evenings a week. Add the exercises and the same arithmetic gives 35–46 sessions.

Guides · 22.09.2026How long does Unity take to learn? The course's own numbers11 min →
29

How long to make my own game and publish it?

No number from a curriculum answers that, because it is a scope question rather than a Unity question. The closest this course can say: a second game reusing exactly what the tab 02 and tab 05 exercises teach — movement, three skills, enemies that chase and hit back, an APK — is 6–9 hours, and only if the art already exists.

Guides · 22.09.2026How long does Unity take to learn? The course's own numbers11 min →
30

Is Unity free, or is the free version just a trial?

It is a plan, not a trial: no expiry, no credit card, and you can publish a commercial game on it. The conditions are a $200,000 revenue-plus-funding ceiling over the last twelve months, and no console build targets without a Pro licence.

Guides · 22.09.2026Is Unity free? What the free plan really includes11 min →
31

Does Unity still charge the Runtime Fee per install?

No. Unity cancelled the Runtime Fee on 12 September 2024, effective immediately and applying to no games, and went back to seat-based subscriptions. Anything still warning you about per-install charges was written before that date.

Guides · 22.09.2026Is Unity free? What the free plan really includes11 min →
32

When do I actually need Unity Pro?

When your organisation's revenue plus funding over the last twelve months is above $200,000, or when you must ship to a closed platform — Switch, PlayStation, Xbox, Vision Pro spatial. Learning Unity and releasing a first game are not on that list.

Guides · 22.09.2026Is Unity free? What the free plan really includes11 min →
33

Do I need to know C# before making a game in Unity?

No, but a little is needed: the first tab spends four short lessons on variables, methods, classes and if/for/List, which is the whole amount a first game asks for. Everything after that is Unity, learned inside the one project you are building.

Guides · 22.09.2026How to make a 3D game in Unity: five stages, one project11 min →
34

How long does a first Unity game take?

The 40 lessons in this course add up to about seven and a half hours of guided work, and the honest multiplier for actually finishing is two to three: the extra time goes into the build, the frame rate and the parts only your project has. A weekend can give you a playable arena; the full five stages give you a game on a phone.

Guides · 22.09.2026How to make a 3D game in Unity: five stages, one project11 min →
35

Is watching more tutorials better than finishing one project?

A tutorial teaches the middle of a game and stops before the parts that decide whether it ships — the build settings, the device, the frame rate. Those exist only in your own project, so ten tutorials leave you able to start many games and finish none.

Guides · 22.09.2026How to make a 3D game in Unity: five stages, one project11 min →
36

I added an Animator but the animation never plays. Why?

Three things stop it, in this order. The GameObject needs an Animator component with a Controller asset in its slot — an empty slot plays nothing and gives no error. The clip needs a state in the Controller, and one state must be the orange default; a clip sitting in the Project window is never played. And the transition out of the default state needs a condition your code actually sets: if you call SetTrigger("Attack") the parameter must be spelled Attack, a Trigger, and the transition must use it. Open the Animator window while the game runs — the state that is playing lights up, and that tells you which of the three is missing.

lessonAnimator state machineCharacter & Combat →
37

How do I make an enemy chase the player and attack?

One distance check picks a state and the state picks the behaviour: farther than the aggro range it idles, inside it walks towards you, within arm's reach it swings on a cooldown. Flatten the Y of the direction vector before measuring, or a player standing on a block reads as far away. For an arena with obstacles use a NavMeshAgent and SetDestination rather than moving the transform yourself — an agent walks around a block, a straight line walks into it and stays there.

lessonEnemies that chase and hit backCharacter & Combat →
38

How do I build a skill system with cooldowns?

Keep the skill as data, not as a script. A ScriptableObject holds the cooldown, damage, range, icon, animation trigger and effect prefab; the caster script holds one dictionary of skill to the time it may next be used. Casting is then: is Time.time past the stored time, if yes play the animation, spawn the effect, apply the damage and store Time.time plus the cooldown. Use Time.time rather than a countdown variable you decrement each frame — one number, no drift, and it survives the object being disabled.

lessonSkill system with cooldownCharacter & Combat →
39

My game stutters when I fire a lot of bullets. What fixes it?

The stutter is Instantiate and Destroy, not the bullets. Every Destroy leaves rubbish for the garbage collector, and the collector stops the whole frame when it runs. Pool them instead: make a list of bullets once at Awake, set them inactive, and on each shot take an inactive one, move it into place and enable it; when it hits something, disable it rather than destroying it. The count stays fixed, nothing is allocated while playing, and the hitch goes away.

lessonProjectiles, damage and VFXCharacter & Combat →
40

What is the difference between the new Input System and Input.GetKey?

The old one asks the hardware directly every frame, so every device needs its own branch in your code and a rebind screen is nearly impossible. The new one puts an asset in between: you declare an action called Move or Jump, bind keyboard, gamepad and touch to it separately, and your code only ever reads the action. Adding a gamepad later is then an edit to the asset, not to the character script. Install it from Package Manager, set Active Input Handling to Both while you migrate, and move one action at a time.

lessonThe new Input SystemCamera & Input →
41

How do I add a virtual joystick and buttons for mobile?

Do not write a second control path. Make the on-screen stick feed the same input action the keyboard feeds, and the character script never learns that touch exists. A stick is two Images — a base and a knob — plus a drag handler that turns the knob's offset from the centre into a vector of length at most one. Put the whole control layer inside a Canvas with Screen Space Overlay, anchor each control to its own corner, and respect the safe area on phones with a notch.

lessonTouch controls and joystickCamera & Input →
42

Do I need Cinemachine, or is my own follow camera enough?

Your own script is enough to follow a character, and writing it once is worth doing because it teaches you why the camera belongs in LateUpdate. Cinemachine earns its place at the next step: damping per axis, a dead zone so small movements do not move the camera, collision so the view does not pass through a wall, and blending between cameras for a cutscene or an aim mode. Those are weeks of work to write and an afternoon to configure. Keep your script while you are learning, switch when you need the second camera.

lessonCinemachine and camera shakeCamera & Input →
43

My scene went dark after I added terrain and lights. How do I fix it?

Dark after a change almost always means the lighting data is stale, not that the lights are wrong. Open Window then Rendering then Lighting and press Generate Lighting; anything marked Static keeps the light it was baked with until you do. Check three more things: the Directional Light is enabled and pointing down at an angle rather than straight along the horizon, the skybox is still assigned in Environment, and Ambient is not set to a black colour. If only some objects are dark, they are static and were baked without a light.

lessonLighting and skyboxWorld & Game Loop →
44

My game runs fine in the editor but drops frames on a phone. Why?

The editor runs on a desktop GPU with no thermal limit; a phone has neither. Measure before you change anything: build a development build, connect the profiler over USB and look at whether the frame is CPU or GPU bound. The usual four are draw calls from many separate materials, textures imported at 2048 that nobody sees at that size, real-time shadows from more than one light, and post-processing left on. Budget 60 frames per second means 16 milliseconds for everything — decide what you spend it on rather than trimming at random.

lessonMobile performance budgetExport to Mobile →
45

How do I make sound come from a position, and control volume in one place?

Sound is positional when the AudioSource's Spatial Blend is moved from 2D to 3D; left at 2D it plays at the same volume everywhere, which is why footsteps seem to follow the camera. Set the rolloff distances so the sound fades over a believable range. For volume, do not set each source by hand: make an AudioMixer with groups for music, effects and interface, route every source into a group, and expose each group's volume as a parameter. Then one settings slider drives a whole category, and muting for a pause menu is one line.

lessonSound and atmosphereWorld & Game Loop →
46

What should I commit and what should I ignore in a Unity project?

Commit Assets/, ProjectSettings/ and every .meta file — the .meta holds each asset's id, and without it references become missing scripts on the next machine. Ignore Library/, Temp/, obj/, Build/ and Logs/: Unity rebuilds them, they are gigabytes, and they differ on every machine. Before anyone clones, set Version Control to Visible Meta Files and Asset Serialization to Force Text, or scene files stay binary and can never be read in a diff.

Guides · 24.09.2026Git for Unity: what to commit and what to ignore10 min →
47

Why is my imported model tiny, rotated, or plain white?

Three separate disagreements, each fixed in the importer rather than on the Transform. Tiny or huge is units: tick Convert Units on the Model tab, or set Scale Factor to 100 for a Blender file. Lying on its face is Blender using Z as up while Unity uses Y: tick Bake Axis Conversion, or apply rotation in Blender before exporting. White is because an FBX carries material names, not images: copy the textures in, then press Extract Materials and fill the slots. Bright pink is different again — that is a missing shader, usually a Built-in material in a URP project.

Guides · 24.09.2026Importing a 3D model: scale, rotation and missing textures9 min →

All the guides