Unity Game Development Concepts
10 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the main function of a shader in Unity?

  • Creating 3D models
  • Setting up the game scene
  • Animating game objects
  • Defining how objects will be drawn (correct)
  • In Unity, why are most 3D models made up of triangles?

  • They provide the most efficient graphics calculations (correct)
  • They are easier to create
  • They are less resource-intensive
  • They are more visually appealing
  • What is the purpose of a normal map in Unity?

  • To simulate surface details through shading (correct)
  • To add physical dimensions to objects
  • To provide color information for shaders
  • To create 3D models from 2D sprites
  • What does 'Skinned Mesh Animation' involve in Unity?

    <p>Moving each vertex of a 3D model based on an internal skeleton</p> Signup and view all the answers

    How does Unity handle lighting in 3D compared to 2D?

    <p>3D lighting is calculated based on sprites</p> Signup and view all the answers

    What is required to have an animated object in Unity?

    <p>A rigged model, animation for the rigged model, an animator component on the Game Object, and an Animator Controller</p> Signup and view all the answers

    Which type of light in Unity casts light from a single point outward in a sphere around it?

    <p>Point light</p> Signup and view all the answers

    What does the Singleton pattern ensure in Unity?

    <p>It ensures only one object of a certain type exists throughout the game</p> Signup and view all the answers

    In Unity, what does Dynamic Friction refer to?

    <p>Friction of a moving body</p> Signup and view all the answers

    What is the difference between Discrete and Continuous collision detection in Unity?

    <p>Discrete is checked once per frame, Continuous checks once per frame and also in between frames for collision</p> Signup and view all the answers

    Study Notes

    Rigging and Animation

    • Rigging a model means setting up an internal skeleton that can be manipulated by an animator to move the model.
    • To have an animated object in Unity, you need:
      • A rigged model
      • Animation for the rigged model
      • An animator component on the Game Object
      • An Animator Controller assigned to the Animator
    • The Animator Controller holds all the separate animations and acts as an interface for your code.

    Lighting

    • There are three basic light types in Unity:
      • Directional (e.g. sun)
      • Point (e.g. hanging light bulb)
      • Spot (e.g. spotlights)
    • Directional lights cast light evenly across the scene and don't fade at a distance.
    • Point lights cast light from a single point outward evenly in a sphere and fade out the further you get from the source.
    • Spot lights cast light from a single point outward in a cone shape and fade out the further you get from the source.

    GameObjects

    • The DontDestroyOnLoad function can be used to move a GameObject between scenes without destroying it.
    • Example: DontDestroyOnLoad(gameObject);
    • A singleton is a code pattern that ensures only one instance of a GameObject exists.
    • Example: public class ScriptName : MonoBehaviour { static scriptName instance; ... }

    Physics

    • 3D physics is similar to 2D physics, with the addition of the Z axis.
    • 3D and 2D physics do not collide.
    • By default, Unity uses Discrete collision detection, which checks for collisions once per frame.
    • Continuous collision detection checks for collisions once per frame and also checks in between frames, but takes a big performance hit.

    Physics Materials

    • Dynamic Friction is the friction of a moving body.
    • Static Friction is how much friction must be overcome to start an object moving.
    • Bounciness determines how much an object should bounce.

    First Person Controls and Materials

    • To rotate a game object towards the mouse's current position, you must first convert it to the same coordinate space.
    • PlayerPrefs is not safe for saving important data.
    • Materials use shaders to set properties of how the object will be drawn.
    • Shaders can use various images, such as textures, provided by an artist.
    • A normal map is a flat image that can be applied and interpreted in the shader.

    2D and 3D

    • Unity was built for 3D, but 2D was supported in Unity 4.
    • 2D uses Orthographic Camera, while 3D uses Perspective Camera.
    • 2D uses sprites, while 3D uses models.
    • 2D lighting is calculated on sprites, while 3D lighting is calculated on models.
    • Every 3D model is made up of lots of smaller flat triangles, known as polygons.
    • Polygons are used because they are the most efficient for graphics calculations, textures, lighting, and shadows.

    3D Animation

    • Skinned Mesh Animation is the practice of moving each vertex of a 3D model relative to an internal skeleton.
    • Rigging is the process of setting up how each point should move relative to the skeleton inside.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Description

    Learn about game development concepts in Unity, including PlayerPrefs, rotating game objects towards mouse position, different coordinate spaces, multiple scenes, 2D and 3D differences, cameras, sprites, models, lighting calculations, and more.

    More Like This

    Untitled
    13 questions

    Untitled

    AmiableWolf avatar
    AmiableWolf
    Mixed-Dimension UI Design for Unity Games
    4 questions
    Unity 3D Environment Creation
    36 questions
    Advanced Game Design Quiz
    34 questions
    Use Quizgecko on...
    Browser
    Browser