Unity Animations on HoloLens not working

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 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.

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.