文档

Unity Engine

Unity Engine

OnAfterDeserialize()

Implement this callback to transform data back into runtime data types after an object is deserialized.
阅读时间1 分钟最后更新于 20 天前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
void OnAfterDeserialize()

Remarks

Unity invokes the
OnAfterDeserialize
callback on an object after deserializing it. In this callback, you can transform the deserialized data back into your preferred runtime data type. For example, use key and value arrays to repopulate a C#
Dictionary
object.
Refer to Custom serialization in the Manual for more information.