The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Unity - Are there autogenerated scripts from animations?
In Unity, I'm animating specific objects and was wondering if there are autogenerated scripts that I can access so that I can manipulate certain properties later via scripting?
Best Answer
-
Optionsstepan_stulov ✭✭✭
What properties do you want to manipulate? Generally there are two "directions" you can go:
You can create serialized fields (use [SerializeField] attribute on privates or just declare publics) in a class extending MonoBehavior. You can then add the component specified by that class onto a game object. These properties are then accessible by the animator so you can create curves and change the values by hand.
You can create an AnimatorController with a graph of animations, transitions, triggers and conditions. You can then navigate through that graph via scripting by calling corresponding methods on that animator. Like animator.SetTrigger("Walk"). I think you can also attach some scripts onto your animator's states, but this I haven't tried myself.
Building the future of holographic navigation. We're hiring.
6
Answers
What properties do you want to manipulate? Generally there are two "directions" you can go:
You can create serialized fields (use [SerializeField] attribute on privates or just declare publics) in a class extending MonoBehavior. You can then add the component specified by that class onto a game object. These properties are then accessible by the animator so you can create curves and change the values by hand.
You can create an AnimatorController with a graph of animations, transitions, triggers and conditions. You can then navigate through that graph via scripting by calling corresponding methods on that animator. Like animator.SetTrigger("Walk"). I think you can also attach some scripts onto your animator's states, but this I haven't tried myself.
https://unity3d.com/learn/tutorials/topics/animation
Building the future of holographic navigation. We're hiring.
Thank you for your response, I think that might be what I was looking for, but I have follow up questions to each direction:
I recommend to familiarize yourself with Unity's basic concepts first: scenes, game objects, components. Then with the animation system: animators, controllers, clips, curves, perhaps even further to blending trees and all the advanced topics. And then, once you're comfortable with it platform-agnostically, simply transfer that knowledge onto the HoloLens. Hope this helps.
Building the future of holographic navigation. We're hiring.