[on-going project see my gitRepo for latest code. updated June2018]
In January 2018, IBM and Unity announced an SDK tying IBM's Watson AI service in to Unity3D. While the SDK provides basic interface, I was also introduced to Unity's ScriptableObject as clean way to do application architecture. I very much like the Composition and Delegate approach Unity has vs more conventional OOP Inheritance, etc. It fits very well with my older approaches to Virtual World creation.
This project explores the intersection of IBM's Web Services, Unity and Composition models.
1 IBM Watson Unity SDK
While announced in Jan 2018 , the Github for the Watson SDK dates back into 2016, so they were working on it for a while. I was asked to use the SDK to integrate Watson into a team project for the Create Reality Hackathon Hackathon in March. In such pressure situations (also often in professional coding) we start with whatever demos are available and stand on the shoulders of army of midgets. Alas, there did not seem to be many complete demos available. The SDK Examples are limited, apparently, to Unit Test scenes and dont show much approaching real use. Fortunately, Ryan Anderson (aka rustyoldrake on GitHub) in collaboration with others in IBM, put out some YouTube Videos (emotional Avatar :
along with a loose collection of example code on github. His videos demonstrate voice commands of the Speech-Text service as well as connections between the Tone Analysis Service and both UI elements and active objects in the scene. While Ryan does not provide a complete Unity example project, I was able to hack up an interface for our hackathon team. It was not very clean, and required deep knowledge of the use of data to dispatch updates, but it worked for that venue.
2 Unity ScriptableObject
I was introduced about this time to the Unity Scriptable Object (abbreviated SO herein) as a rather powerful Data Container (etc). This looked like a very useful way to abstract the data from Watson and make it available where ever the designers (vs programmers) wanted to use it. Ryan Hipple gave a very good, highly professional talk on Scriptable Objects at Unite Austin 2017:
Ryan's code is available in a githup repository. His blog post gives some hints on the complexity of the SO usage at Schell Games that is the basis of his examples. It would be VERY interesting for someone to publish a more robust Variable, Reference, Event system built on ScriptableObjects.
Ryan referenced a 2016 talk by Richard Fine on "Overthrowing the MonoBehaviour Tyranny in a Glorious Scriptable Object Revolution" (love the title):
Richard also shared his code on a BitBucket Repository
I've also been following Jason Weimann's Unity3d.college video tutorials. He recreated some of Ryan's work in slightly different examples...
With these as motivation, I embarked on a Watson/Unity example using the ScriptableObject Data Architecture.
3 My Explorations
[this section is also exploring how to use Hackaday to document a project in process. ...Read more »