Recall & Review
beginner
What is a variable in Unity?
A variable is a container that holds data, like numbers or text, which can change while the program runs.
Click to reveal answer
beginner
What does serialization mean in Unity?
Serialization is the process of saving an object's data so Unity can store or transfer it, like saving game settings or player progress.
Click to reveal answer
intermediate
Why use the [SerializeField] attribute in Unity?
It lets private variables show up in the Unity Editor so you can change their values without making them public.
Click to reveal answer
intermediate
What types of variables can Unity serialize by default?
Unity can serialize basic types like int, float, string, bool, and also Unity types like Vector3 and custom classes marked with [System.Serializable].
Click to reveal answer
beginner
How does serialization help with saving game data?
Serialization converts game data into a format that can be saved to a file or sent over a network, so the game can load it later exactly as it was.
Click to reveal answer
Which keyword makes a variable visible in the Unity Editor without making it public?
✗ Incorrect
The [SerializeField] attribute allows private variables to be shown and edited in the Unity Editor.
What is the main purpose of serialization in Unity?
✗ Incorrect
Serialization is used to save and load data, like game states or settings.
Which of these variable types can Unity serialize by default?
✗ Incorrect
Unity serializes basic types like int, float, and string by default.
What happens if you make a variable public in Unity?
✗ Incorrect
Public variables are shown in the Unity Editor and can be edited there.
Which attribute marks a custom class as serializable in Unity?
✗ Incorrect
The [System.Serializable] attribute tells Unity to serialize custom classes.
Explain what variables and serialization mean in Unity and why they are important.
Think about how data is stored and changed in a game.
You got /3 concepts.
Describe how you would make a private variable editable in the Unity Editor using serialization.
It's about showing private data without making it public.
You got /3 concepts.