You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there!
I've found your project on the Preset blog post on Unity's website, glad that people are looking into it and doing some nice custom stuff with it!
I got one comment for you regarding this file: Tools/AssetPresetPreprocessor/AssetPresetPreprocessor.cs
When applying a Preset to an asset, you probably want that asset to be re-imported whenever the Preset used to enforce the settings get changed, and this is possible starting in 2019.3 and using asset database v2.
You have to call context.DependsOnSourceAsset(AssetDatabase.GetAssetPath(preset)) before applying the preset to the importer. This way you get assured of two things:
Your asset will not be imported before the Preset is discovered by the asset database (or if it does, it will stop importing at that point and will wait for the Preset asset to be imported first).
Your asset will trigger a re-import automatically to use the new Preset setting whenever the Preset asset is changed on disk (when updating your project from a VCS or changing the Preset values and using Save Assets).
We also have a bunch of improvements coming in 2020.1 for presets, including the PresetManager being able to handle folders and any naming convention you want, along with Partial Preset that allows you to exclude properties from the Preset directly in the Preset or its inspector. You may want to have an early look at that as you're a doing a bunch of stuff that may not be necessary anymore after this release.
The text was updated successfully, but these errors were encountered:
Hey there!
I've found your project on the Preset blog post on Unity's website, glad that people are looking into it and doing some nice custom stuff with it!
I got one comment for you regarding this file: Tools/AssetPresetPreprocessor/AssetPresetPreprocessor.cs
When applying a Preset to an asset, you probably want that asset to be re-imported whenever the Preset used to enforce the settings get changed, and this is possible starting in 2019.3 and using asset database v2.
You have to call context.DependsOnSourceAsset(AssetDatabase.GetAssetPath(preset)) before applying the preset to the importer. This way you get assured of two things:
We also have a bunch of improvements coming in 2020.1 for presets, including the PresetManager being able to handle folders and any naming convention you want, along with Partial Preset that allows you to exclude properties from the Preset directly in the Preset or its inspector. You may want to have an early look at that as you're a doing a bunch of stuff that may not be necessary anymore after this release.
The text was updated successfully, but these errors were encountered: