2
votes

I have created a HoloLens app using Unity 3D. In the app I want to show a text canvas with some animation on click of a button. I have done this with Animator control and script to open an Animation state on click of a button. This is working fine when I try on Unity Preview. However when I try the same app on HoloLens emulator or on device the animation doesn't work. The canvas opens up simply without any animation after some delay (I think delay of animation to be completed). This is not the case for Unity Game Preview.

Please let me know what else we do to support Animations made in Unity on HoloLens.

1
You could try setting an animation event with a debug to see if it runs. UI has been going through high and low in Unity so could be something recently broken. Which Unity version are you on?Everts
The Unity version is 5.4.0f3-HTP and it is the latest version.patel kavit
Have you tried setting events on the animation to see whether it is not running at all?Everts
Yes Everts, I have added two events one at animation start and another at animation end. However both are not called.patel kavit
Not sure what is the issue but I found that when I run the project in HoloLens, animator component for the canvas is not available. The following line results null animator. animator = GetComponent<Animator>(); . We are able to have the animator object for the same in Unity Preview but when we run the same project in HoloLens it returns null animator. I think this is the root of the problem. Please let me know if anyone has face similar issue.patel kavit

1 Answers

0
votes

I have fixed the issue. Not sure what was the exact problem but the cube object was mashed off as added some components, which might not actually needed. Freshly re-designing the cube and animations worked.