I was hoping someone here, maybe even folks from Unity could give me a few more pointers regarding the Playable API.
A while ago I found this via IntelliSense, as the Animator is now deriving from DirectorPlayer. Now since Unity 5.2. the API appears to be semi-official, as it is now documented as Playable API, though it is marked as experimental and not actually listed in the namespace list.
I realize that for now its primary purpose seems to be the mixing of animations and whole animation controllers. So we can combine whole state-machines in constructed weighted tree. Very powerful, though I do not have an immediate use for that.
Now the documentation also indicates that we can build customize Playable behavior be deriving from said class. Specifically, the method documentation for Playable.ProcessFrame has an example that shows it is possible to build a graph/tree that is completely data-driven instead of animation orientated. That would be incredibly awesome for BehaviorTrees and similar systems! I want this for our toolset now!
However, the example is not actually working. The line with “GetComponent().Play(…)” is a bit odd. I cannot add DirectoryPlayer as a component, because it is an abstract class. Sure, I thought, it makes sense to force people to implement their own DirectoryPlayer if they want something adjusted to their needs. So I derived a custom class from it, but that’s not working either. It cannot be added in the Editor, and also not via scripting. The error says it is not a Unity type, which I believe is telling me that I cannot have a script which derives from Behavior (that’s what DirectoryPlayer does), it must derive from MonoBehavior.
So that’s how far I got. Guess this feature is not ready yet?
Does anyone know how to make it work, just for “experimental” purposes?
Or what’s the intention with this new feature, am I crazy assuming I can be used for editor tools, such as small project-specific visual scripting purposes?