The ExposedReference API looks really neat. The example code has two glaring errors, though;
public class CameraSwitcher : StandardAsset
I have no idea what StandardAsset is. I can’t find it in any docs, and my editor can’t find it. It’s not even there if I search through the sources with ILSpy. Is this just a mess up, or is StandardAsset a part of some package?
The second error:
frameData.exposedPropertyResolver
Playables.FrameData has no field or property named “exposedPropertyResolver”, so that won’t compile either. Is the documentation using features that hasn’t made it into the main release?
I’m also confused about this:
I tried setting up a test asset:
using UnityEngine;
[CreateAssetMenu]
public class TestObjectReference : ScriptableObject {
public ExposedReference<Camera> camera;
}
I created one, and tried to assign a camera from a scene to it. No luck - it only accepts assets. So that doesn’t work.
I’m also confused about IExposedPropertyTable. It seems like the only one that exists is the one returned by PlayableGraph.GetResolver. So there seems to be no way for us to resolve objects in a scene by default.
From what I can tell, this system only works in the context of the Playables system somehow. Is this how Timeline links scene objects to assets behind the scene, perhaps? Anyway, the docs state that they’re supposed to work together with ScriptableObjects. Is that wrong?
Are we supposed to create our own subclass of ExposedReference, together with a drawer, and implement our own IExposedPropertyTable for each scene? That’s doable, but somewhat reduces the coolness of the system - I could make something like that already.