Phase 4 updates

Phase 4 · Slice 7 ·

ScriptableObjects

  • ScriptableObject with CreateInstance<T>(), (Type) and (string), by full or short class name, logging Unity's error for an unknown one. As Unity's trace shows, Awake and OnEnable run inside CreateInstance. Instantiate deep-copies the serialized fields, names the copy <name>(Clone), then runs the copy's Awake and OnEnable. Destroy runs OnDisable and OnDestroy at the end of the frame. DestroyImmediate runs them at once, and the object reads as null after.
  • .asset files import as ScriptableObjects (main object 11400000):
    • the class comes from m_Script and m_EditorClassIdentifier;
    • fields are read like a MonoBehaviour's;
    • references to materials, prefabs and other assets resolve by GUID, then Awake and OnEnable run. Scenes and prefabs reference them as {"asset": "guid:fileID"}, and saving writes them back with Unity's reference type 2.
  • Resources.Load in Unity projects: .asset, .prefab and .mat files in any Resources folder load by path and type. Models, textures, audio and text still load as plain files.
  • New scriptable_object scenario. unity_import now covers a config asset (strings with colons, a color, a list of serializable classes, a hex-packed int array, material, prefab and asset references) and Resources.Load with the right, the base and a wrong type: 273 checks, directly and through the editor form. 25 scenarios pass.
  • Next: .asmdef assemblies, MCP resources and the exec tool.