I am trying to make an editor script to set the import settings for my images. I don't want to do this manual since I need to import hundreds of images.
So I want to set edit the default import settings.
I tried the following:
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
[InitializeOnLoad]
public class EditorSettings : Editor {
private static TextureImporter CustomImporter;
static EditorSettings()
{
CustomImporter.npotScale.None; // see below for error.
}
}
the error I get is the following:
Member 'TextureImporterNPOTScale.None' cannot be accessed with an instance reference; qualify it with a type name instead
How do I do this? (it has something to do with how unity lets me acces the properties.)
And is this even the correct way to change the import settings for images?
Let me know if anything is unclear so I can clarify.