cancel
Showing results for 
Search instead for 
Did you mean: 

False OVRPlugin change detection from Meta XR Core SDK v63

korinVR
Expert Protege
From Meta XR Core SDK v63, the "Changes to OVRPlugin detected" dialog appears even without any plugin changes.
 
I discovered that OculusProjectConfig.asset contains hashes of the plugin's FULL PATH from v63. This means that simply moving the project or sharing it among team members triggers a false "Restart Unity" dialog.

From OVRPluginInfoOpenXR.cs:

 

string md5Win64Actual = GetFileChecksum(Path.GetFullPath(PluginRelPathWin64));
string md5AndroidActual = GetFileChecksum(Path.GetFullPath(PluginRelPathAndroid));​

 

v62:

 

private static string GetFileChecksum(string filePath)
{
    using var md5 = new MD5CryptoServiceProvider();
    byte[] buffer = md5.ComputeHash(File.ReadAllBytes(filePath));
    return string.Join(null, buffer.Select(b => b.ToString("x2")));
}

 

v63:

 

private static string GetFileChecksum(string filePath)
{
    using var md5 = new MD5CryptoServiceProvider();
    byte[] buffer = md5.ComputeHash(File.ReadAllBytes(filePath));
    byte[] pathBuffer = md5.ComputeHash(Encoding.UTF8.GetBytes(filePath));
    return string.Join(null, buffer.Select(b => b.ToString("x2"))) + string.Join(null, pathBuffer.Select(b => b.ToString("x2")));
}

 

I encountered the issue when I updated my project to v64 and just commited the change to GitHub. My CI automated build started crashing due to the incorrect plugin change detection and I struggled to find the cause for hours...

 

I believe this behaviour is unexpected, and the change should be reverted.
2 REPLIES 2

earlgeorg
Honored Guest

The pathBuffer should be at least using the relative path to the Unity project / package. People working on different workspace root folders will always get a different hash because of this change.

SufferinPup
Honored Guest

Still a problem in v65. I really really hope they change this in v66.