You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, thanks a lot for the great examples in this repo. They are spot on for what I am building and the code is really easy to follow. Great work!
Now, if I manipulate the target coordinates in the inspector (not using the gizmo) the clip object automatically updates and I see how the character changes position in the scene view. However, if I use the gizmo in the scene view to change the target, the playable does not update automatically. I see the coordinates change in the inspector but the character in the scene view does not follow. In other words, CreatePlayable in AICommandClip is not called if I use the gizmo with OnSceneGUI. It is only called through OnInspectorGUI()
As I am new to timeline and its graph architecture, I don't really understand how to trigger the graph from OnSceneGUI to reinvoke CreatePlayable. Hope my explanations are not too confusing. Any help is highly appreciated.
Best,
Raphi
The text was updated successfully, but these errors were encountered:
raphipaffi
changed the title
Custom gizmo for PlayableAssets (like AICommandClip) don't trigger update of playable
Custom gizmo doesn't trigger update of PlayableAssets (like AICommandClip)
Mar 5, 2021
Hey Ciro,
first of all, thanks a lot for the great examples in this repo. They are spot on for what I am building and the code is really easy to follow. Great work!
I am working on custom timeline playables and stumbled over one issue that I couldn't resolve. I coded a playable that is very similar to your example with the AICommands to move characters in the scene providing a target position and relying on Navmesh in play mode. For preview in edit mode, I use a custom editor that shows a gizmo to manipulate a target position, just like your example code:
https://github.com/UnityTechnologies/ATerribleKingdom/blob/master/Assets/Scripts/CustomTimelineTracks/AICommand/Editor/AICommandInspector.cs
Now, if I manipulate the target coordinates in the inspector (not using the gizmo) the clip object automatically updates and I see how the character changes position in the scene view. However, if I use the gizmo in the scene view to change the target, the playable does not update automatically. I see the coordinates change in the inspector but the character in the scene view does not follow. In other words, CreatePlayable in AICommandClip is not called if I use the gizmo with OnSceneGUI. It is only called through OnInspectorGUI()
As I am new to timeline and its graph architecture, I don't really understand how to trigger the graph from OnSceneGUI to reinvoke CreatePlayable. Hope my explanations are not too confusing. Any help is highly appreciated.
Best,
Raphi
The text was updated successfully, but these errors were encountered: