Animating Materials works in Preview, but not in Play/Runtime/VisonProSim etc

Have a problem with my Vision Pro test app. Not sure if it’s related to Polyspatial or not, or special project settings for the Vision Pro, but it works perfectly fine in a fresh URP project:

  1. I have a project with an animation which animates a material (eg. change cube from grey to red). This looks good in preview, but when I click play, the material does NOT animate in the Game window (but looks perfectly good in the preview window).

  2. To make this even more mysterious, when I start a fresh Unity project (URP), and do EXACTLY the same thing, it does work. But in my original project (also URP, but based off of one of the VisionPro Sample projects), it does not. There must be some kind of setting or so which I am missing and it’s probably really silly once I know what it is.

Attached are two video screenshots:

  1. My original video showing how the material animates correctly in preview but not in game…

  1. A fresh project I created as a test where it works perfectly fine in both preview and in game…

Any help would be much appreciated. I had this happen in the past when I tried to animate a materials transparency, but never figured out what it was.


There’s a known issue with animating material properties. The problem is basically that the animation system doesn’t flag the material as dirty, indicating that it should be re-transferred over PolySpatial. We plan to fix this eventually, but for now, a workaround may be to set some other material property to a new value every frame just to ensure that the material is re-transferred.

Thank you that worked as a workaround in the meantime.

1 Like