-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAssetImportProcessor.cs
More file actions
29 lines (23 loc) · 877 Bytes
/
AssetImportProcessor.cs
File metadata and controls
29 lines (23 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using UnityEngine;
using UnityEditor;
namespace III.AssetImportProcessor
{
/// <summary>
/// Configure Asset import settings on first import.
/// </summary>
public class AssetImportProcessor : AssetPostprocessor
{
void OnPostprocessAsset()
{
// The variable "assetImporter" references the importer for the asset that is currently importing.
AssetImporter importer = assetImporter;
if (importer == null) return;
//If we already have a meta file for that asset it's a reimport and not a first import, so we don't want to apply the preset.
if (importer.importSettingsMissing)
{
// TODO
// string assetName = System.IO.Path.GetFileNameWithoutExtension(importer.assetPath);
}
}
}
}