here is my code
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Collections;
public class Texture2PNG : ScriptableWizard
{
//varibles
public Texture2D[ ] texture2Convert;
[MenuItem(“Textures/CreatePNG”)]
//create wizard
static void CreateWizard()
{
ScriptableWizard.DisplayWizard(“Conve rt 2 PNG”, “convert”);
}
void OnWizardCrate()
{
foreach (Texture2D texture in texture2Convert)
{
FileStream fs = new FileStream(Application.dataPath + texture + “.png”, FileMode.Create);
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(texture.EncodeToPNG());
bw.Close();
fs.Close();
}
}
}
can someone please help thanks