linkedin-skill-assessments-quizzes

Unity (Animation, Asset Management, C# Scripting, Gameplay, Programming)

Q1. What can you use to visually distinguish between Play mode and Design mode in the editor?

Q2. A developer executes the C# code below, which finds any game objects tagged as “enemy” in a start event. But the developer notices that, when executed, FindGameObjectsWithTag returns NULL even though the scene contains objects tagged as “Enemy”. What is a possible cause?

GameObject[] MyEnemies = GameObject.FindGameObjectsWithTag("Enemy");

Q3. What does this code sample achieve? Float Answer = Random.value * 10f;

Q4. Unity scenes may be saved entirely in the YAML format. Why might you do this?

Also, the text data can be generated and parsed by tools, making it possible to create and analyze scenes automatically. Reference

Q5. Which visual effects are removed by Orthographic cameras?

Gamma color space and bloom are related to graphics. Depth of field is related to objects blurring when at a certain distance from the camera.

  1. Reference
  2. Reference

Q6. What is Cinemachine Virtual Camera used for?

Use the Aim, Body, and Noise properties to specify how the Virtual Camera animates position, rotation, and other properties. The Virtual Camera applies these settings to the Unity Camera when Cinemachine Brain or Timeline transfers control of the Unity camera to the Virtual Camera. Reference

Q7. What does the Microphone class save captured audio data as?

The Microphone class saves captured audio as an audio clip asset, which may then be stored as an OGG file. Reference

Q8. Cinemachine offers tools for building gameplay behaviors. Which component makes spline-based paths for moving objects?

Q9. When building assets like meshes for Unity. Which measurement unit is the most suitable to use?

ReferenceUnity’s default units are in meters (Unreal Engine too). If you keep this in mind and model with your units aligned to meters, the lighting system will work with minimal artifacts.

Q10. The Collaborate feature of Unity Teams empowers whom to do what.

Q11. The Clear Flags property of the Camera components affects which behavior?

Q12. What is the OnAnimatorMove event on MonoBehaviour objects commonly used for?

Q13. Which MonoBehaviour method runs by default in Editor mode?

Q14. For the OnTriggerEnter function to invoke successfully on a collision between two objects, at least one must have which two components?

Q15. UI elements, such as images and buttons, may be fixed at specific screen positions to build responsive interfaces. Which Unity features help achieve this?

Q16. The occlusion map of a material is often a grayscale image with pixels ranging between black and white. What does this map contribute to an object’s material?

Q17. What can you use to organize different game objects into groups inside the Hierarchy panel?

Q18. The Project Windows search box can filter the display of assets with text commands. Which command displays only texture assets?

Q19. A bullet game object is fired from a weapon and travels quickly through the scene using a RigidBody component. It sometimes passes through solid objects even though they have colliders. What is a reasonable strategy for correcting this?

Q20. Some material types may include normal map textures. What does a normal map achieve?

Q21. A SkinnedMeshRenderer component is attached automatically by Unity to some mesh objects when they are added to a scene. Which reason best explains why?

Q22. Which C# attribute can show a private variable in the object inspector?

Reference

Q23. What is a technique for optimizing Unity UI elements?

Reference Every time an element on a canvas is updated, the whole canvas is redrawn. If elements are never being updated, keeping them on a single canvas is ideal.

Q24. What does the C# Space attribute used below achieve?

[Space(20)]
Public string PlayerName;

Reference This is a great way to customize your inspector without writing a new inspector script for it.

Q25. Every time you double-click a C# script file from the Project window, Unity prints the message below (or something very similar) to the console. What is a reasonable step in trying to solve this? Cannot start the process because a file name has not been provided

Q26. What are the Console windows useful for?

Q27. Sprite atlas assets, large textures containing many smaller sprites, can be optimized by batching together what?

Q28. You are making a game where you need to execute your own functions in response to critical animation events for a rigged character. Specifically, there are two events you must handle: when an animation state is entered and when it is exited in the Animator graph. Which class may be used to invoke your code when those two events happen?

Reference OnStateMachineEnter() and OnStateMachineExit() are the methods of the StateMachineBehavior class that handle this. AnimatorClipInfo displays information about the current clip being played, AnimatiorUtility deals with transform hierarchy, and AnimationInfo was removed in version 5.0.

Q29. How can you change the unique bundle identifier for a mobile build?

Q30. Rigidbody components may be added to objects with colliders to make them affected by physical forces. What does the IsKinematic property achieve?

Q31. The primary directional light in a scene is linked by default to a procedural scene Skybox. What does the rotation of this light control?

Q32. You can combine quaternions together through which arithmetic operation?

Q33. Which feature generates binary tree data to optimize camera rendering in a scene?

Q34. How does the Range C# attribute control the interaction behavior of numerical variables in the Object Inspector?

Q35. What does this code fragment do when attached to a rigged character?

    public Animator avatar;
    public Transform lookAtObj;
    void OnAnimatorIK(int layerIndex)
    {
        avatar.SetLookAtPosition(lookAtObj).position;
        avatar.SetLookAtWeight(If);
    }

Q36. The variable Transform.forward is a Vector3 measured in what?

Q37. De-lighting is associated with which technology?

When you use photogrammetry to scan in models from the real world, and bring in those models into Unity (or any renderer), you will notice that the lighting information is baked into the texture. You can remove the baked in lighting information with various tools online, but even Unity themeless wrote a custom tool for just this; check it out!

  1. Reference
  2. Reference

Q38. Humanoid character assets, like NPCs and the player character, feature on Avatar object. Which statement best describes its purpose?

Q39. You can perfectly align two mesh objects together at the vertices by using vertex snapping. How do you best access this tool?

Vertex

Reference

Q40. Which statement best describes the function Quaternion.Euler?

Simplfying the math: Unity uses Quaternions internally to avoid Gimbal lock. The Euler XYZ (Pitch, Yaw, and Roll) axises can lock up when two axies are aligned. Quaternion.Euler converts the Euler number provided to the internally used Quarternion, to prevent this problem. Reference

Q41. What does the Destroy function do?

ReferenceThe object obj is destroyed immediately after the current Update loop, or t seconds from now if a time is specified.

Q42. You can programmatically control audio effects, like Pitch and Reverb, from C# scripts using which feature of an Audio Mixer asset?

Official Unity Tutorial:Audio attenuation is about energy loss, commonly refered to as "gain". ParamEQ allows you to change the frequency of the audio - "pitch", with no C# support. Audio Mixer groups do allow you to control audio effects, but not through C#.

Q43. Multiple animations may be mixed together on a single character, selectively on different limbs. Which Mecanim feature supports this?

ReferenceMip Maps are a technique that improves image quality and reduces rendering speed, at the cost of storage space, by including smaller copies of the image in the same file. Animation events allow you to call functions at points in the timeline.

Q44. What does the PlayableDirector component allow you to do?

ReferenceThe PlayableDirector component stores the link between a Timeline instance and a Timeline Asset.

Q45. What does the Grid component do?

Q46. Timeline sequences can initiate code during an animation using which feature?

EventSystem is not a timeline feature, neither are packets. Timeline signals are a subfeature of the markers, markers can directly initiate code, while a signal can only send the signal to a reciver.

  1. Reference
  2. Reference

Q47. Which code sample uses C# properties for creating the health functionality?

public class Health : MonoBehavior
{
    private float HealthPoints = 100f;

    public float GetHealth()
    {
        return HealthPoints;
    }

    public void SetHealth(float Change)
    {
        HealthPoints += Change;

        if (HealthPoints <= 0)
            Destroy(gameObject);
     }
}
public class Health : MonoBehavior
{
    public UnityEvent OnHealthChanged;

    private float HealthPoints = 100f;

    public void SetHealth(float Change)
    {
        HealthPoints += Change;
        OnHealthChanged.Invoke();
    }

    public void Die()
    {
        Destroy(gameObject);
    }
}
public class Health : MonoBehavior
{
    public float HealthPoints
    {
        get { return _healthpoints; }
        set
        {
            _healthpoints = value;

            if(_healthpoints <= 0 )
            {
                Destroy(gameObjects);
            }
        }
    }

    private float _healthpoints = 100f;
}
public class Health : MonoBehaviour
{
    public float HealthPoints = 100f;

    private void Update()
    {
        if (HealthPoints <- 0)
            Destroy(gameObject);
    }
}

get and set are the clear indicators that a C# property is being used. Reference

Q48. Which statement is not true?

Reference

Q49. When is the Reset method of MonoBehaviour invoked automatically?

ReferenceReset is called when the user hits the Reset button in the Inspector’s context menu or when adding the component the first time. This function is only called in editor mode.

Q50. Which C# attribute allows a class and its methods to run inside the editor during Edit mode?

ExecuteAlways makes instances of a script always execute, both as part of Play Mode and when editing. By default, MonoBehaviours are only executed in Play Mode and only if they are on GameObjects in the main stage containing the user Scenes. By adding this attribute, any instance of the MonoBehaviour will have its callback functions executed at all times.

  1. Reference Do not fall for [RunInEditor]! It looks similar to MonoBehaviour.runInEditMode and [ExecuteInEditMode] both of which are legit but not mentioned as possible answers.
  2. Reference

Q51. The IsPointerOverGameObject static function of the EventSystem class is useful for creating which behaviour?

Q52. Which C# code fragment continuously updates an object’s yaw (Y rotation)?

Q53. What can you do to improve the searchability of your project’s assets?

Q54. The Y keyboard shortcut activates which in-editor tool?

Q55. What does the Input.touchCount variable represent?

Reference

Q56. During gameplay, you need to serialize selected variables (data) of all enemies to send over a network for parsing to generate statistics about the current play session. Which Unity class helps convert object data to JSON text format?

Reference

Q57. Which texture format is generally avoided in Unity?

Reference

Observation: I tested it in Unity itself and pressing it activated the rotate, scale and transform function, in the documentation (unity 2018.2) it says that it is a unified one, in the documentation of the most recent unity (2022.2) I did not find anything different