- Home /
Question by
Steven-1 · Jan 10, 2014 at 03:13 PM ·
importlabelunity4assetpostprocessor
labels unknown in AssetPostprocessor?
I made an AssetPostprocessor in Unity 3.5, which works fine. It checks the labels of Textures, and imports it differently depending on those labels
Now I tried it in Unity4, but it seems Unity doesn't know the labels, so it doesn't work.
here's the code:
List<string> labels = new List<string (AssetDatabase.GetLabels(texture));
for (int i=0; i<labels.Count; i++)
labels[i] = labels[i].ToLower();
if (labels.Contains("extend_margin1"))
margin = 1;
//...
In Unity4 AssetDatabase.GetLabels(texture) returns an empty array
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613130029im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to add UserData to FBX 3 Answers
How to 'call' AssetPostprocessor script? 1 Answer
Creating a prefab in AssetPostprocessor.OnPostprocessAllAssets(). 1 Answer
Unity 4 crashes on importing packadges 1 Answer
How to update import settings for newly created asset during OnPostprocessAllAssets 3 Answers