Unity Quiz Questions with Answers

Table of contents:


1. Who created the initial version of Unity?

☐ David Helgason ☐ Joachim Ante ☐ Nicholas Francis ☑ All mentioned

The initial product launched on June 6, 2005.

The goal was to create an affordable game engine with professional tools for amateur game developers.

2. Is Scripting editor part of Unity?

☐ YES ☑ NO

Scripting Editor is where you will write the actual code for your game objects to interact. This may be MonoDevelop, Microsoft Visual Studio, Sublime, or some other editor.

Scripting editor is not part of Unity. Unity (or Unity Studio) is the visual environment where you interact with the game objects using different views (Game View, Scene View, Inspector View, Hierarchy View, …)

3. When you create a new scene, it will contain?

☐ Empty game object ☐ Main Camera game object ☐ Light and Main Camera game object ☑ It depends

If you create a 2D scene it will have just the Main Camera game object, if you create a new 3D scene it will have Main Camera game object and the Light.

The Main Camera is the viewport through which the player sees the scene. It’s not much of a game if you can’t see it, so it makes sense that this is always included in a new scene.

4. You would like to address all enemy objects in your game?

Use tags ☐ Use layers

Using tags you can address groups of game objects from once effectively. There is a handy function FindGameObjectsWithTag() you may use.

Layers doesn’t have such functionality. Their main purpose is to reduce the processing load.

Layers can restrict raycasting or rendering operations, when applied to the relevant groups of objects.

5. Scripts are components?

True ☐ False

Scripts are components. They affect the look, behavior, or interaction of game objects.

Scripts are essentially custom components that you create for the unique requirements of your game.

6. What is the name of the component that every 3D game object must have?

Transform ☐ RectTransform ☐ NetworkTransform ☐ Mesh

Transform component is one component that every 3D game object must have. Even the empty one.

7. What is the 2D version of Transform component?

Rect Transform ☐ Transform2D ☐ PlaneTransform ☐ Transform

The Rect Transform component is the 2D layout counterpart of the Transform component.

Where Transform represents a single point, Rect Transform represent a rectangle that a UI element can be placed inside.

If the parent of a Rect Transform is also a Rect Transform, the child Rect Transform can also specify how it should be positioned and sized relative to the parent rectangle.

8. Unity File->Save Project will also save the current working scene?

☐ YES ☑ NO

At first you can assume Save Project would save everything in the project, including the scene you are working on.

However, this is not true. It actually saves everything in the project except for the current scene, such as assets or overall project settings.

As with anything involving a computer, it is a good habit to save your work frequently.

9. Components govern … of the game objects?

☐ the look ☐ the behavior ☐ the interaction ☑ all true

A game is made up of scenes, a scene is made up of game objects, a game object is made up of components, and components have properties that are governed by their internal functions.

Scripts are components too. They also affect the look, behavior, or interaction of game objects.

Scripts are essentially custom components that you create for the unique requirements of your game.

10. An asset type that allows you to store game objects and create multiple instances later is called?

Prefab ☐ Package ☐ Asset Store ☐ Serialized

The prefab acts as a template from which you can create new game object instances in the scene.

Any edits made to a prefab asset are immediately reflected in all instances produced from it but you can also override components and settings for each instance individually.

A package is a container that holds any combination of Assets, Shaders, Textures, plugins, icons, and scripts that enhance various parts of your project.

Asset store is a library of free and commercial packages.

Serialization is the automatic process of transforming data structures or object to strings.

11. Find the intruder?

☐ Directional light ☑ Sport light ☐ Point light ☐ Area light

Sport light is the intruder. There is no such light in Unity. The following lightning sources are possible:

Directional light: Acts like sunlight to illuminate every game object in the scene, though it does not come from a single point source.

Spot light: Cone-shaped area of light from a single point that acts like a spotlight or flashlight.

Point light: Acts like a light bulb, shining in all directions from a central point.

Area light: Used for baking into lightmaps.

12. All 3D game object shapes are made up of interconnected …?

triangles ☐ lines ☐ quads ☐ squares

All 3D game object shapes are fundamentally made up of interconnected triangles called polygons.

Each polygon is defined by its three sides (or edges), and the points where these edges meet, called vertices or verts.

The mesh is the collection of polygons making up the 3D geometry of a game object.

13. When you move the game object on the scene what will happen with the child game object?

will move with parent ☐ will not move with the parent

When game objects have a child relationship to a parent object, their Transform position becomes relative to the parent (instead of world zero).

If you move the parent object, the child objects will maintain that relative positioning.

14. Can you use Awake() function to pass information from one object to another.

☐ YES ☑ NO

The order in which the game objects’ Awake() function is called is random, so you would not want to use the Awake() function for passing information from one object to another as the receiving object might not be ready yet.

15. How you can pause the game?

Time.timeScale = 0 ☐ time.deltaTime = 0; ☐ Time.fixedDeltaTime = 0 ☐ Time.time

Time.timeScale = 0; is the correct one. Time.smoothDeltaTime, Time.time, Time.unscaledDeltaTime, Time.deltaTime are read only.

16. To make your camera point at an object as it moves what method you need to use:

LookAt() ☐ Follow() ☐ No method exists ☐ You need to make camera child of object

The LookAt() method will do just that.

In your camera script you will have code like this: transform.LookAt(object);

17. Main Camera is game object?

☐ True ☑ False

Like any game object it is same for Main Camera. You can move it, apply scripts to it, and do anything else that applies to game objects in general.

The Main Camera is the viewport through which the player sees the scene.

18. You can debug Unity game from Visual Studio or MonoDevelop?

True ☐ False

From Visual Studio or MonoDevelop you can setting breakpoints, step over the code, and inspect variables and expressions.

19. Which method executes first in MonoBehaviour?

Awake() ☐ onEnable() ☐ Start() ☐ Update()

The next list is the MonoBehaviour Event Execution Order:

Awake() // script first load
OnEnable()  // when game object is enabled
Start() // when script is enabled
Update() // once per frame
LateUpdate()  // just after Update()
OnBecameVisible() // when renderer is visible by any camera
OnBecameInvisible()  //  when the renderer is no longer visible by camera
OnDrawGizmos()  // for gizmos drawing
OnGUI()  // multiple times per frame in response to gui events
OnApplicationPause()  // called at the end of a frame when a pause is detected
OnDisable()  // every time object is disabled
OnDestroy()  // game objects objects being destroyed

20. Game objects without Rigidbody component are considered?

Static colliders ☐ Gismo colliders

The Rigidbody component is an essential component when adding physical interactions between objects.

Game objects which don’t have a Rigidbody component are considered static colliders. When moving a game object, it is good to add a Rigidbody to it for efficiency.

If you want to control its movement directly, you simply need to mark it as kinematic on its Rigidbody properties.

Term Gizmos is used to give visual debugging or setup aids in the scene view. Gismo colliders do not exist. They are fake.

21. To check if your bullet hits the target you use:

Raycasting ☐ Trajectory Simulation

Raycasting is a very useful and powerful tool available on the physics engine.

It allows us to fire a ray on a certain direction with a certain length and it will let us know if it hit something.

This however, is an expensive operation; its performance is highly influenced by the ray’s length and type of colliders on the scene.

You call it with Physics.Raycast().

22. In Unity to make games you can use?

☐ Scripts ☐ Managed Plugins ☐ Native plugins ☑ All mentioned

In Unity, you normally use scripts to create functionality, but you can also include code created outside Unity in the form of a Plugin.

There are two kinds of plugins you can use in Unity: Managed plugins and Native plugins.

Managed plugins are managed .NET assemblies. They contain only .NET code which means that they cannot access any features that are not supported by the .NET libraries.

Native plugins are platform-specific native code libraries. They can access features like OS calls and third-party code libraries that would otherwise not be available to Unity.

23. What is required for the game to play?

☐ Tags ☑ Layers

Unlike Tags, the first seven layers are required by Unity and you are limited to a total of 31 layers.

24. What is the default script editor in Unity?

MonoDevelop ☐ Visual Studio

MonoDevelop is the integrated development environment (IDE) supplied with Unity.

An IDE combines the familiar operation of a text editor with additional features for debugging and other project management tasks.


25. What is the name of Unity animation system?

☐ Blender ☑ Mecanim ☐ Skeletal ☐ Maya

Mecanim is Unity’s animation system.

Mecanim allows you to take an animation from one character model and re-target it onto another, rather than having to create an entirely new animation sequence for the second character.

26. Creating the three-dimensional shape game object is called:

Modeling ☐ Rigging ☐ Bones ☐ Skinning

Modeling is the process of creating the three-dimensional shape of the game object, where this shape is made up of a number of triangles typically referred to as polygons.

Bones are used to control the movement of the character. Rigging is the creation of joint hierarchy. Skinning is connecting the mesh to the bones of the joint hierarchy.

27. What is the name of the component used to connect animation clips (animations) with particular game object?

☐ State Machine ☐ Clips Controller ☑ Animator Controller ☐ Animator

The Animator Controller is a component used to glue animation clips to the game object.

The various animations are called states. For example, when a character is idle, it is in the Idle state. Moving from one state to another is called a transition.

The compilation of states and transitions that you design for Animator Controller represent what is called a state machine. Animator (Window -> Animator) is a Window from where the Animator Controller is controlled.

28. In the Animator Controller one state must be default. It is represented in what color?

Orange ☐ Gray ☐ Turquoise ☐ White

Orange is correct.

29. To make a transition not interruptible by other transitions make it:

☐ condition ☑ atomic ☐ solo ☐ mute

You should make the transition atomic. Mute and Solo are the debugging options.

Transition condition is what will specify the transition to run. Transitions are often in control by parameters from the Animator controller. There can be multiple conditions per transition.

30. Animation window is not the same as Animator Window?

True ☐ False

The Animation Window (view) allows you to build and customize your own animations within Unity.

For instance, you can create the animation for the Main Camera game object to create the level preview for the player.

31. A simplified humanoid bone structure that Mecanim understands how to animate is called?

☐ Rigidbody ☑ Avatar ☐ Skeleton ☐ Bones

An Avatar is a simplified humanoid bone structure that Mecanim animate.

32. To define input axes and game actions for your project you need?

Input Manager ☐ Physics Manager ☐ PresetManager ☐ PlayerSettings

Input Manager (Edit->Project Settings->Input) is correct.

The Input Manager is where you define all the different input axes and game actions for your project.

This solves a particular challenge for dealing with different platform user input, which might come from the keyboard, mouse, joystick, gamepad, or the touch and accelerometer input of mobile devices.

33. What component game object need to have to be considered by the Unity physics engine?

☐ Collider ☐ Physics Raycaster ☑ Rigidbody ☐ Transform

A game object must have a Rigidbody component for the physics engine to recognize it.

The physics engine does the calculations on how the object will behave, resulting in a change in the object’s Transform component.

While you could change the Transform itself, this might interfere with the game engine’s calculations and result in unexpected behavior.

34. To make rotational movement to Rigidbody you would use:

☐ AddForce() ☑ AddTorque()

AddForce() and AddTorque() are the functions you use in scripts to apply forces to a Rigidbody.

Torque is a type of force that results in a rotational movement.

35. What is the name of the component that enables a game object to react when it comes into contact with other game objects?

☐ Rigidbody ☑ Collider

Collider component enables a game object to react when it comes into contact with other game objects.

36. Find the intruder?

Game Collider ☐ Mesh Collider ☐ Sphere Collider ☐ Capsule Collider

There is no Game Collider.

In 3D, these are primitive colliders: the Box Collider, Sphere Collider and Capsule Collider.

In 2D, you can use the Box Collider 2D and Circle Collider 2D.

Also the compound collider that would be when you merge several primitive colliders.

When compound colliders are not accurate enough you can use also the Mesh Colliders to match the shape of the object’s mesh exactly.

37. Colliders are visible during the game?

☐ YES ☑ NO

Colliders are invisible during the game.

38. The size of the collider must match the game object?

☐ True ☑ False

You can offset the collider from the game object.

The size doesn’t have to be the same as the game object.

☐ Update() ☑ FixedUpdate()

Update() runs once per frame.

FixedUpdate() can run zero, one or several times per frame, depending on how many physics frames per second are set in the time settings, and how fast/slow the frame rate is.

FixedUpdate() should be used when applying forces, torques, or other physics-related functions - because you know it will be executed exactly in sync with the physics engine itself.

40. With Unity you can create all game genres (Action, Adventure, Strategy, Sports, Simulation, Puzzles)?

True ☐ False

There are absolutely no limitations for creating any game in Unity base on type.

Action, Adventure, Strategy, Sports, Simulation, Puzzles games are possible.

41. What is bad choice for texture dimension?

☐ 2 ☐ 8 ☐ 16 ☑ 30

Textures should have dimensions based on powers of 2, as in 2, 4, 8, 16 and so on.

More memory is used for non-power-of-2 dimensions, which in turn slows down the GPU.

Another optimization approach is to use a compressed texture file format to reduce memory usage.

42. Is this code OK?

transform.position.x = 10;

☐ YES ☑ NO

The issue is that you cannot modify the position from a transform directly.

This is because the position is actually a property (not a field). Instead, the proper would be to write:

Vector3 newPos = new Vector3(10, transform.position.y, transform.position.z); transform.position = newPos;

43. Cube, Sphere, Capsule, Cylinder, Plane and Quad are called?

Primitive game objects ☐ Poligon game objects

These are primitive object types that can be created directly within Unity, namely the Cube, Sphere, Capsule, Cylinder, Plane and Quad.

44. Unity supports only C# out of the box?

☐ True ☑ False

One can use any one of the following three scripting languages: JavaScript, C#, Boo.

45. To preserve the game objects for on a scene transition you use?

DontDestroyOnLoad() ☐ They will not be destroyed

When loading a new level all objects in the scene are destroyed, then the objects in the new level are loaded.

In order to preserve an object during level loading call DontDestroyOnLoad on it.

46. Unity coroutines have nothing to do with threading?

True ☐ False

Coroutines are state machines sometimes connected with the generator functions. They are not async await.

47. When you draw a game to the screen frame-by-frame this is called:

Rendering ☐ Screening ☐ Shooting ☐ Tracing

To render a game means to draw it to the screen, frame by frame, at a rate fast enough to provide this same illusion of movement in the game.

The Unity game engine calculates game object position and lighting frame-by-frame.

48. To improve Unity skills you can:

☐ Attend game jams ☐ Create your own games ☐ Read books about Unity ☑ All mentioned

Game jams are great way to improve your skills in a super-fun high-intensity happening.

Game jams are essentially organized group challenges, where individuals or teams must create a game from scratch within a short period of time, usually 24 to 48 hours.

Teams are formed from the participants at the start of the game jam. Their goal is to produce a functioning game prototype. This prototype must conform to the game jam’s guidelines, which might designate such things as a theme or feature that must be used.

49. Unity can publish games for the web?

☑ True ☐ False

Unity supports over 25 platforms including web. Example platforms: iOS, Android, Windows desktop, Mac OS desktop, Linux desktop, WebGL, Unity Web Player, …

50. To represent rotations Unity uses:

Quaternions ☐ Torque ☐ Vectors ☐ Spherical coordinates

Unity internally uses Quaternions to represent all rotations.

They are based on complex numbers and are not easy to understand intuitively.

Common Quaternion functions are:

Quaternion.LookRotation, Quaternion.Angle, Quaternion.Euler, Quaternion.Slerp, Quaternion.FromToRotation and Quaternion.identity.

tags: quiz - unity & category: csharp