You may incorporate animation into the GLB background by creating animation clip in Unity.
For this example, let's us create an animation to move a basket on Japanese Kotatsu table.
Select the root object to export as GLB. Click on Add Component in the Inspector
and select [Miscellaneous] > [Animation] to add an animation clip.
Open the Animation window.
On the menu bar, select [Window] > [Animation] > [Animation], OR press Ctrl + 6.
On the Animation window, click Create to create an animation clip.
You may create it in any place easy to find. For this example, we will create a folder called “Animation” and name the file as Kotatsu.anim.
On the root object, add the “Kotatsu.anim” we just created.
Click on the record button (the red circle) in the Animation window.
The timeline bar will turn red as you can see in the figure at the right. You can edit the animation in this state.
Add a subject to move with the animation.
You can incorporate three kinds of elements into GLB animation.
In this example, we will create an animation that rotates in a place forever.
Click on [Add Property] and select [“the object to move”] > [Transform] > [Rotation].
Specify a degree of the rotation.
Click on the beginning of the timeline and specify the Rotation of the object as “0.”
Click on the end of the timeline and specify the Rotation of the object as “360.”
Clicking on the play button (button with a triangle) will play the rotating animation.
While this animation is okay, if you are not happy with the automatic deceleration at the looping point of the animation, refer to Troubleshooting: Animation decelerates automatically.
While we created a rotating animation in this example, you can also incorporate position and scale into your animation as well.
However, please remember that Virtual Cast only recognizes animation clips integrated into the root object only. Therefore, animations integrated into child objects do not work.
Just like with the standard GLB export, select the root object of the background, and
select [VRM] > [UniGLTF-1.28] > [Export] to export.
Make sure that the animation clip is in the root object.