How to reproduce:
- Open the “IN-144378_TestNew” project
- Go to Edit > Preferences > Editor Diagnostics, unfold “Editor” and enable “ForceAlwaysWriteTypeTrees”
- Go to Build Profiles and enable “Development Build”
- Build the project
- Disable “Development Build”
- Build the project
- Use the binary2text.exe tool from the Unity Editor installation folder to convert the “globalgamemanagers” binary file located in the second (Release) build - for example, run the command in PowerShell:
C:\Program Files\Unity\Hub\Editor\6000.0.63f1\Editor\Data\Tools> .\binary2text.exe "C:\IN-144378_TestNew\Builds\awinrelease\Repro-InvalidatedPattern_Data\globalgamemanagers" "C:\awinrelease.txt"
- Observe the “invalidatedPatternTexture (PPtr<Texture2D>)” properties in the converted to text file
Actual result: Value of m_FileID = 1 and value of m_PathID = 4
Expected result: Value of m_FileID = 0 and value of m_PathID = 0
Reproducible with: 6000.0.0f1, 6000.0.76f1, 6000.3.17f1, 6000.4.10f1, 6000.5.0b11, 6000.6.0a6
Reproducible on: Windows 11, macOS 15.7.7 (M1)
Not reproducible on: No other environments tested
Workaround:
- Close the Unity Editor and reopen the same project again
- Build the project (choose “Clean Build” in the dropdown for the Build button)
Notes:
- Reproducible in a Build for Windows, MacOS, Linux (have not tested other build targets)
- Development Build may also need to be a Clean Build to get the value of m_FileID = 1 and value of m_PathID = 4 stored (if a release build had been done at first which stored value of m_FileID = 0 and value of m_PathID = 0)
- The snippet from the converted to text “globalgamemanagers” file to observe:
invalidatedPatternTexture (PPtr<Texture2D>)
m_FileID 1 (int)
m_PathID 4 (SInt64)