コード例 #1
0
        private void OnPreprocessAsset()
        {
            if (!assetImporter.importSettingsMissing)
            {
                return;
            }

            if (!IsPresetAsset(assetImporter.assetPath))
            {
                return;
            }

            string path = Path.GetDirectoryName(assetPath);

            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            if (!PresetManagerStorage.IsInstanceAvailable())
            {
                return;
            }

            PresetManagerUtils.ApplySettingsToAsset(path, assetImporter);
        }
コード例 #2
0
        static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets,
                                           string[] movedFromAssetPaths)
        {
            if (!PresetManagerStorage.IsInstanceAvailable())
            {
                return;
            }

            if (IsPresetAsset(importedAssets) || IsPresetAsset(deletedAssets))
            {
                PresetManagerUtils.ProjectPresetsChanged();
                return;
            }
        }