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
- Domain Reload loading popup is dark when Editor Theme is set to "Light"
- Scene Views breaks and errors are spammed in the Console when the Game view is shrunk vertically to the minimum, and the Aspect Ratio is 16:9 or 16:10
- Slider Fill Area disappears after undoing “Set Native Size” change
- Crash with multiple stack traces when playing video on a render texture with low-end graphics devices
- Circle handle of the Game view scale slider bar disappears when the scale is set to 1x
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.