TypedAssetRef for scene fields in components

Problem

Scene IDs are currently hard-coded as GUID strings in component scripts (see examples/scene-management/assets/SceneDirector.zig). The component-field hydrator does not support a TypedAssetRef(.scene) variant, so designers cannot wire scene transitions from the inspector.

Goal

Extend the asset-ref hydration pipeline so a component can declare a scene field:

pub const MyDirector = struct {
    pub const is_component = true;

    next_scene: engine.TypedAssetRef(.scene) = .{},

    pub fn update(self: *MyDirector, frame: engine.Frame) void {
        const mgr = frame.service(engine.SceneManager) orelse return;
        if (frame.input.wasKeyPressed(.space))
            mgr.requestLoad(self.next_scene.guid(), .single);
    }
};

and have the inspector show a scene-asset picker for that field, serialised into the scene JSON as a GUID.

Scope

  1. Add .scene variant to TypedAssetRef (or make it generic over AssetType).
  2. Extend the component-field scanner to recognise TypedAssetRef(.scene) fields.
  3. Add inspector UI: asset-picker button filtered to .json (scene) assets.
  4. Serialise/deserialise the GUID in scene JSON (already works for material refs — same path).
  5. Update SceneDirector in examples/scene-management/ to use the ref instead of the hard-coded constant.

Context

  • Scene management API implemented in issue #22 (closed).
  • Material TypedAssetRef hydration is already in place — this follows the same pattern.
  • Gap documented in docs/plans/scene-management.md ("Scene references as data").