-
Notifications
You must be signed in to change notification settings - Fork 520
Interactivity Runtime Playback #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Interactivity Runtime Playback #849
Conversation
Thanks! Are you going to push those extra work as well in the next days? |
c80e195
to
48b5cf7
Compare
@hybridherbst Rebased on dev, I should be able to finish the importer context stuff this week I think. |
Behaviour engine and wrappers are now added in the InteractivityImporterContext so no additional work needs to be done by devs to enable runtime playback beyond the checkbox in their GLTFSettings asset. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are this logs still necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The majority of the logs in this PR are using Util.Log which is a wrapper using the [Conditional] attribute. As a result they are excluded from builds as if they were wrapped in #if DEBUG_MESSAGES/#endif.
This way the package doesn't spam someone's console but if I want to get all my debug messages back I can do it package-wide by adding DEBUG_MESSAGES to my script compilation symbols in the player settings or add define DEBUG_MESSAGES at the top of classes that I specifically want to enable them for.
i get an error in Unity: |
and i would suggest to change the plugin names to "KHR_interactivity Playback Importer" and "KHR_interactivity Playback Exporter", just for cleareance :) |
Do you have an exactly reason why are you not using "OnAfterImportScene" , so you're required to add OnLoadingComplete? Between these both callbacks are mostly only memory disposables and cleanups |
I found that in OnAfterImportScene that scene.Extensions is null. I guess that's more of a bug to be fixed than a reason to add another callback. |
0a13ec5
to
a242aef
Compare
I tried to import a Gltf Asset with interactivity, sadly... your BehaviourEngine is not serializable. Would be really great if you can make it serializable, so your implementation would also work with Gltf Assets. Or maybe save your imported Graph as an subasset, not sure. |
|
||
private void CheckForObjectHoverOrSelect() | ||
{ | ||
var ray = Camera.main.ScreenPointToRay(Input.mousePosition); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jmangles I believe this code path (and other places where inputs are used) should use Unity's event system. Otherwise this won't work in e.g. XR, for multitouch, and accessibility cases, where inputs come from "somewhere else than he mouse".
5b6a790
to
6aa9c4d
Compare
…ed in the InteractivityImporterContext automatically. Unit tests updated to create their own engine and wrappers as the tests are using generated graphs and non-interactive glbs. Added import events to GltfImportPlugin for mesh, camera, vertex colored material, and load complete.
… a folder named Debug.
…in the editor and run via playmode. Previously only interactive GLTFs imported at runtime could play back an interaction.
…ately starts playback. Colliders now get added to any GLTF node object in Unity that if hover/select events are present and the object does not have a collider (if selectable/hoverable extension is present it only adds the collider if it is marked as hoverable/selectable).
…lectability or hoverability extension if a collider is not already present.
…des that don't have a collider during import
216ae7a
to
8141209
Compare
…/rotate2D to capitalize the D.
60dbaad
to
9fc86bd
Compare
…deserialization stage rather than each time the node with that configuration runs. Reduces memory alllocations for graphs with heavy use of pointers.
…ave a single completed event node.
…various math nodes to match current spec. Removed indentation from generated test json.
…th nodes with multiple output values. Added isValid output value to matDecompose.
…pose tests use approximation subgraphs to avoid floating point errors in some engines.
Migration of everything from https://github.com/magicleap/UnityGLTF-Interactivity to UnityGLTF itself.
Some extra work required to implement behaviour engine and wrapper component creation in ImporterPlugin/Context files before merging.
Supports every node in the current spec along with core pointers and most extension pointers. Includes unit tests for every node that can be run in Unity and automatically export as json for consumption in other engines.