Make a simple animation viewer

Hi guys !

I’m quite new to Unity and quite bad in english, i’ll try to do my best.

I’m trying to make an animation viewer in Unity. I use generic avatars, and I got some troubles to view my animations on Unity viewer builtin.
The situation is: all my friends don’t get 3D software to check my animations, so I would like to build an Unity scene so they can play randomly animations on a given character.
It can be useful for me too, to check if they are well set at the import, before putting them in the gameplay logic.

I began to script it (C#) but i got some troubles.
First I wanted to just give to the script, by the Inspector, a character Prefab and a directory where I store animation files (with animation clip inside). But I couldn’t manage to give a directory as variable in the Inspector. Is there a way to do it? Or should I put it as string variable written by hand?

Then, with my animation clip list, how could I play them on my character? Is it possible to randomly chose one and play it, by the Animator Component? It’s like the animation system does not really allow it. Is there some trick to do it, without building an Animation Controller state machine?

I’m here to find more advices than solutions. If you think i’m on the wrong way, and there is better ones, please tell me.

Thanks!

For your answer Lets go step by step,
First thing you asked is, Is there are way to create an animation viewer?
And the answer is Yes, and the way i am able to think is to create an app and play animations randomly so that your friends will be able to play.

Second question was: You can do with directory but the thing is you will have to provide the path where the animations are stored and its bit confusing to do it. There is a lengthy process for doing it.

Third part was: You can do with animation component but it will be far easy if you create an animation controller and create an integer variable and you assign a value for every animation and then by script you will have to get a random no. and assign it to animator and it will play a random animation.

hope this helps.
@Diccy