Search Issue Tracker
By Design
Votes
0
Found in
2018.2.0b9
Issue ID
1052975
Regression
No
Changes made using TextureImporter.SetPlatformTextureSettings are not properly saved and do not appear in the Inspector preview
How to reproduce:
1. Open the user-submitted Project
2. In the Project Window click on the "Test Sprite" - observe the Override and Max Size settings
3. Go to "Assets" -> "Set Importer Settings"
4. Click on the "Editor" folder and click on the "Test Sprite" again
5. Observe the now changed Override settings and the preview
6. Save the Project, close it and reopen it
7. Observe the "Test Sprite" settings again
Expected result: The new settings are properly saved and appear correctly in the Inspector preview
Actual result: The settings are never properly saved (checking the .meta file shows the old settings), the Inspector preview also shows the old settings
Reproduced in: 2018.2.0b10, 2018.1.7f1, 2017.4.6f1, 2017.2.3p2, 2017.1.4p2
Couldn't test in: 2018.3.0a3
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 (2018.3.X):
Whenever settings get changed on an AssetImporter, it is necessary to call AssetDatabase.ImportAsset to make sure the AssetDatabase see the changes.
The best way to do it is the following:
public void ChangeImportSettings(string path)
{
var importer = AssetImporter.GetAtPath(path);
// change some settings on the importer
// Use this method in case you are using a cache server and want to make sure it is updated with the new settings.
AssetDatabase.WriteImportSettingsIfDirty(path);
// Reimport the asset so it is up-to-date with the previous changes.
AssetDatabase.ImportAsset(path);
}