Cinemachine priority vs m_StreamingVersion

Hi,

I was debugging why some CinemachineCamera were having their priority changed when being activated. Turns out, they had m_StreamingVersion = 20170927 which made them call PerformLegacyUpgrade in playmode which changes the priority because m_StreamingVersion is lower than 20220601.

  1. So even if I set a priority in the inspector, this will override that value.
  2. I don’t see any way for these camera to get their m_StreamingVersion updated in edit mode so that this does not happen again.

My workaround would be to change the m_StreamingVersion values in a text editor.

Is this a bug? An abnormal situation? Is there a better fix than my workaround?

Cheers

We’ve never seen this issue before. Can you send me the corrupted project?

I created a new project and then copied over my camera prefab.
https://www.dropbox.com/scl/fi/46iro865krr1v7dsvzxjk/CinemachinePriorityStreamingVersion.zip?rlkey=6bbo071ryxup891v44an85qwf&dl=0

Repro

  1. Open SampleScene project
  2. Enter Play Mode
  3. Enable the gameobject CinemachineCamera20170927
  4. Notice that the Priority of the camera will change from 99 to 10

By creating this project, I found out that the better workaround is to enable the gameobject in edit mode, which will trigger PerformLegacyUpgrade on the priority and update m_StreamingVersion to the lastest version. Then, I can re-set the priority to whatever I want.

So it seems the issue is old CinemachineCamera that are disabled in scenes and so their m_StreamingVersion are never updated in edit mode.