The RayTracingShaderImporter has platform target as a dependency. If an associated asset is created on Mac then when opening the project containing the asset (and Library folder) on Windows, the asset is not reimported automatically. **
Steps to reproduce:
1. Unzip and open the attached project TestMac-1.zip on Windows using Unity 6000.0.20f1 (05208a74e9aa).
2. Click on the NewRayTracingShader.raytrace and notice the errors in the Inspector.
3. Open the Import Activity window and notice that the file was not reimported when opening the project on Windows.
4. Reimport the asset manually and notice the Reasons in the Import Activity window.
Actual results: The NewRayTracingShader.raytrace asset is NOT reimported when opening the project on Windows.
Expected results: The NewRayTracingShader.raytrace asset is reimported when opening the project on Windows because of the target platform change.
Reproducible with versions: 6000.0.20f1 (05208a74e9aa), 2023.3.0a11
Not reproducible with versions: Doens't reproduce before 2023.3.0a11
Tested on (OS): Windows 11 23H2
Notes:
- See the attached images (Mac.png and Windows.png) with the Import Activity window.
- On Mac after creating a NewRayTracingShader.raytrace asset - Mac.png
- On Windows after the asset is reimported manually after opening the zipped project. Notice the Reasons for importing the asset correctly detects the target platform change from 2 on Mac to 19 on Windows - Windows.png.
- To create an asset using RayTracingShaderImporter then use the context menu in the assets window: Create > Shader > Ray Tracing Shader.
Slack threads:
https://unity.slack.com/archives/C05GGGKTWAF/p1727342622347019
https://unity.slack.com/archives/CV9P2CNP4/p1727103483086639