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
- Different build sizes between Editor build and command-line build when "Static Batching" is enabled
- Particle System "Start Rotation" property affects a different axis when upgrading to newer Editor versions
- "Light" Component's "Culling Mask" setting is hidden but still has an effect when using HDRP
- Selecting the Web platform can be done when using the HDRP project
- Textures swap when SpriteRenderers with shared materials and animators are toggled on and off
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);
}