yoklainterview sim

Game Development Un Scriptableobject Serialization Interview Questions

75 verified Game Development Un Scriptableobject Serialization interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Un Scriptableobject SerializationDifficulty 1
In Unity, when you declare a public field on a MonoBehaviour, what happens to it by default regarding serialization?
  • aIt is serialized and shown in the Inspector automatically
  • bIt is only serialized if you also add [SerializeField]
  • cIt is never serialized because it is not a property
  • dIt is serialized only after the GameObject is instantiated
Explanation:A public field is automatically picked up by Unity's serializer and Inspector, with no extra attribute needed.
Un Scriptableobject SerializationDifficulty 1
A private field with no attributes is declared on a MonoBehaviour. What is true about it by default?
  • aIt is serialized but hidden from the Inspector automatically
  • bIt is not serialized and does not appear in the Inspector
  • cIt is serialized only in builds, not in the Editor
  • dIt is serialized the same way a public field is
Explanation:Without [SerializeField], a private field is invisible to Unity's serializer — it behaves like a normal C# private field only.
Un Scriptableobject SerializationDifficulty 1
What does adding [SerializeField] to a private field accomplish?
  • aIt converts the field into an auto-implemented property
  • bIt removes the field from the compiled assembly in builds
  • cIt makes Unity serialize and show it in the Inspector
  • dIt marks the field as read-only at runtime
Explanation:[SerializeField] opts a private field into Unity's serialization system, so it is saved and editable in the Inspector despite not being public.
Un Scriptableobject SerializationDifficulty 2
A field on a MonoBehaviour is declared as static. Does Unity's serializer include it?
  • aYes, but only the first instance's value is saved
  • bYes, static fields serialize like any public field
  • cOnly if [SerializeField] is also added to it
  • dNo, static fields are never serialized by Unity
Explanation:Static fields belong to the type, not an object instance, so Unity's per-object serializer excludes them entirely, regardless of access modifier or attributes.
Un Scriptableobject SerializationDifficulty 2
Which of these field declarations will Unity's serializer skip, even though the field is public?

public readonly int maxHealth = 100;
public int maxMana = 50;
[SerializeField] private int maxStamina = 30;
public int[] resistances = new int[3];
  • apublic readonly int maxHealth = 100;
  • bpublic int maxMana = 50;
  • c[SerializeField] private int maxStamina = 30;
  • dpublic int[] resistances = new int[3];
Explanation:readonly (and const) fields are excluded from serialization because Unity's serializer needs to write values into the field, which a readonly field does not allow after construction.
Un Scriptableobject SerializationDifficulty 2
A MonoBehaviour has 'public int Health { get; set; }'. Will this appear in the Inspector?
  • aYes, because it is a public member
  • bNo, C# properties are never serialized by Unity
  • cYes, but only if it has a backing field with the same name
  • dNo, but only because it is missing [SerializeField]
Explanation:Unity's serializer only reads and writes fields, never properties — adding [SerializeField] to a property has no effect, because properties are compiled to methods, not fields.

Test yourself against the 2850-question Game Development bank.

Start interview