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
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
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);
}