Search Issue Tracker
By Design
Votes
0
Found in
2020.3
2021.2
2021.2.1f1
2022.1
Issue ID
1385293
Regression
No
Accelerator Returns Incorrect Data when Asset is imported using Custom Importer
Reproduction steps:
1. Set up accelerator for this project
2. Open the attached project "repro.zip"
3. Create an empty file "a.artmat" in "Assets/test" folder in Windows Explorer
4. Bring Editor to focus
5. Change 11th line of "Assets/test/Editor/TestImporter.cs" to "TextAsset ta = new TextAsset("7");"
6. Reimport "Assets/test/a.artmat"
7. Move "Assets/test/a.artmat" and "Assets/test/a.artmat.meta" files to the project folder in Windows Explorer
8. Reload the project
9. Move "a.artmat" and "a.artmat.meta" files to the "Assets/test" folder in Windows Explorer
10. Select "Assets/test/a.artmat"
Expected result: "Assets/test/a.artmat" contents are: "7"
Actual result: "Assets/test/a.artmat" contents are: "1"
Reproducible with: 2020.3.24f1, 2021.2.5f1, 2022.1.0b1
Could not test with: 2019.4.33f1 (Could not downgrade the project)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note (2022.2.X):
This is actually as designed. We don't do a hash of the source for dependency tracking, as it's not trivial to generate because it can depend on code from anywhere.
Instead what users should do is increment the version number of the scripted importer. See https://docs.unity3d.com/2020.1/Documentation/ScriptReference/Experimental.AssetImporters.ScriptedImporterAttribute.html for more information on the Scripted importer attributes, including the "version".
We have had chats in the past about generating a hint for users saying something "We've detected a possible change in the importer version. Consider incrementing it.". But this isn't on the roadmap, so therefore not something we'll be looking at anytime soon.