In this tutorial we will create animation loops in Maya that run continuously for Unity.
In Unity: Prebuilt SteamVR Project with Universal Rendering Pipeline & Post Processing Download this 2020 scene, move the folder to your Desktop or working area. This file is already setup with SteamVR and some other tools. https://classes.dma.ucla.edu/Winter22/156/projects/URPtemplate.zip
PC: Right mouse over folder select Extract All...
Rename the template folder. Place it in a new location.
Start the Unity Hub Select ADD Locate your renamed project folder Click on the project to start
Mac Only: Mac error: Answer SwitchTarget
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
In Maya: Model a simple room with some animated objects, no floor. It is best to keep walls separate.
Model a Room Use 1 grid unit as 1 foot for scale.
Create poly models for the items in your VR environment. (NURBS do not work)
If you use Booleans Difference: Run Mesh->Triangulate to make the model more acceptable to Unity. Run Edit->Delete by Type->History
Shaders and Textures Use a Lambert Shader, other shaders will be ignored by Unity.
If you have any image texture maps place them in your Unity project-> Assets folder Assign any textures from inside Maya, using the images located inside your Unity project->Assets folder.
Save Save the Maya room file to your Unity project-> Assets folder
Any changes you make to your Maya model will automatically update because the Maya file resides in your Unity project. (You may want to save a backup of this model outside of Unity from time to time.)
In Unity: Initial Model setup Select the Maya file in the Assets list Select the Model tab in the Inspector Change the Scale Factor to .3 Uncheck Import Cameras and Lights (Very important for VR, Maya camera interferes with VR camera.) Click Apply
Add the Maya file to your scene Drag the Maya model from Assets up to the Hierarchy
Add a Mesh Collider to the Maya Model Select the Maya model in the Hierarchy Select Add Component in the Inspector (Clear out any prior searches, if any.) Select Physics->Mesh Collider (It is best to use primitive shape colliders when possible.)
In Maya: Animation, Rotation Example It can be cleaner to keep animation models in separate scene files.
Move the time slider over to frame 1 at the bottom of the screen.

Change 24 fps to 30 fps over to the right on the time slider.

Select a poly object.
Use the channel box on the right side of the screen. If you do not see the channel box, hit the button upper right side of the screen.
Highlight Rotate Y in the Channel Box Use the right mouse key to bring up mini menu, choose Key Selected.
Change the End Time of the animation to 301

Move the time slider over to frame 301.
Rotate the object 360 degrees in the Y axis
Highlight Rotate Y in the Channel Box Use the right mouse key choose Key Selected.
Use this process for any channel that can be animated.
Change the End Time of the animation to 300 The loop will perfect playing between 1 and 300. Unity looks at the length of the animation from the time slider to determine length.
Graph Editor Select you object Select Windows->Animation Editors->Graph Editor Select the animation curve Select Tangents->Linear this will make the timing a constant speed.

Preview the animation Move the time slider over to frame 1 at the bottom of the screen.
Right mouse over the time slider to bring up the mini-menu select Playback Speed->Real-time
Hit the play arrow on the time slider. 
Stop the playback by clicking the mouse on the red square over the play arrow.
Save Maya File to Unity Assets Save the Maya scene file into your Unity project->Assets folder You will see your models and textures appear automatically in Unity.
(Maya has a utility to send files straight to a Unity project, it saves as an FBX, the scale is completely wrong. Do not use.)
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
View your Maya Animation in Unity In Unity:
Adjust Maya file: Select the Maya file in the Assets list Select the Model section in the Inspector tab Change the Scale Factor to .3 Uncheck Import Cameras and Lights (Very important for VR, Maya camera interferes with VR camera.) Hit Apply

Switch to Legacy Animation Select your Maya Model in the Assets area Switch to the Rig tab in the Inspector on the right. Change Animation Type to Legacy (default was Generic) Hit Apply
Loop If you would like to loop your animation: Select the object that has the animation from the Assets window Change to the Animation section of the Inspector tab Change Wrap Mode to Loop (near top) Change Wrap Mode located beneath Take 001 to Loop too Hit Apply
Now your animations are all set up to run continuously.
Move the Animation into the Hierarchy Drag your Maya file from the Assets list over to the Hierarchy tab.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Try Running your Project Always Save your scene before playing. Hit the Play button 
If you are running in Sim mode use wasd,qr or the arrow buttons to navigate around the scene,
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Publish to WebGL You may view your project on a website server and access via the internet
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: EXAMPLES http://classes.dma.ucla.edu/Fall20/156-1/projects/examples/B_Maya_anim1_player http://classes.dma.ucla.edu/Fall20/156-1/projects/examples/C_activate_animation_player http://classes.dma.ucla.edu/Fall20/156-1/projects/examples/table_lamp_player
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: **IMPORTANT Save a spare copy of your Maya scene files and Textures in another folder away from your Unity project.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: OBS OBS screen capture VR documentation
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

|