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. Orthographic cameras remove which visual effect?

Gamma color space and bloom are related to graphics. Depth of field is related to objects bluring 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 a OGG file. Reference

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

Q9. When building assets like meshes for Unity. It is good practice to use which measurement unit?

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

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

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

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?

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. Reference

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

[Space(20)]
Public string PlayerName;

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

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 process because a file name has not been provided

Q26. What is 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?

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. Reference

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 descibes 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?

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

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

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#. Official Unity Tutorial:

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

Mip 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. Reference

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

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

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