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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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.