Hi every one, I made a tool with a custom editor (buttons, frames, GUISkin, etc.) and compiled my tool into a dll (with Monodevelop), but, when I try to put the guiskin and the images, I can’t use that inside the dll, I’m new about dll compilation and I don’t understand many things, even I find some info about how to put and use resources into a dll but I get some errors like: can’t convert -System.IO- to -Unityengine.Texture2D-, any help will be appreciated, thanks in advance.
Code Sample:
using System;
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Reflection;
//
public class MyTool : EditorWindow
{
Texture2D images;
GUISkin mySkin;
Assembly myAssembly;
Stream imageStream;
//
static void Init()
{
// Draw the window.
}
//
void OnEnable ()
{
myAssembly = Assembly.GetExecutingAssembly();
images = myAssembly.GetManifestResourceStream("Images.Data.Button.png");
}
void OnGUI ()
{
GUI.skin = mySkin; // Here, I don't know how to search for the *.guiskin file inside the dll.
GUI.Button(Rect(0, 0, 32, 32), images);
}
}