~/talk

Serialization in-depth

Talkat Unite Nordic 2013 · 2013-05-21..05-22· [game-development]
links:none on file
slides:none on file

Explains why editor-window data vanishes on assembly reload: Unity extracts managed object fields into the C++ side, tears down managed memory, reloads assemblies, then reinjects serialized data. Demonstrates failing examples (plain class, user structs losing the float), fixes with [Serializable] and [SerializeField], shows that plain class references get duplicated on deserialize while scriptable objects preserve reference identity if created with CreateInstance and managed with hideFlags. Covers arrays vs. polymorphic lists (base-typed lists lose data), sub-assets via AssetDatabase.AddObjectToAsset, and custom editors/property drawers (Unity 4 feature) that work as shown.

AI-written summary · about

  1. 0:00Introduction to serialization
  2. 1:50Understanding assembly reload
  3. 3:26Case study: simple classes
  4. 5:00Rules for class serialization
  5. 6:15Structs and serialization
  6. 7:43Class references and data loss
  7. 9:19Using Scriptable Objects
  8. 11:29Scriptable object rules
  9. 13:09Initialization order
  10. 15:28Hide flags and object visibility
  11. 18:38Serializing arrays and lists
  12. 20:20Polymorphic serialization issues
  13. 22:14Complex hierarchies
  14. 24:05Creating and using assets
  15. 27:03Customizing the editor GUI
  16. 29:40Property drawers
  17. 32:44Connecting assets to the game
  18. 35:00Sub-assets and organization
  19. 37:39Asset hierarchy and conclusion
  20. 39:43Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.