Noticias

¡RECUERDA QUE SI ERES UN NUEVO USUARIO, DEBES PRESENTARTE PARA PODER PUBLICAR MENSAJES! | TENEMOS CANAL OFICIAL DE TELEGRAM: t.me/unity3dspain

EditorWindow

Iniciado por enrique.perez, Octubre 28, 2015, 04:33:05 PM

Tema anterior - Siguiente tema
hola estoy tratando de hacer ke se dibuje una textura al fondo de un editor window pero esta como ke se pone borrosa en los bordes, el codigo es senciyo, no se lo ke pasa. ya modifike los import settings de la imagen.
using UnityEngine;
using Unit***itor;
using System.Collections;

public class ScriptClassName : EditorWindow
{
private static Texture2D tex;
public static ScriptClassName window;
[MenuItem("Tools/Something1")]
private static void showMani***tor()
{
   window=EditorWindow.GetWindow<ScriptClassName>(false, "Something1");
   window.position = new Rect (50,50,1024,768);

}
void Awake(){
   tex = (Texture2D)Resources.Load ("images/maps/Capture",typeof(Texture2D));

}
void OnGUI()
{
   if(tex!=null)
      GUI.DrawTexture(new Rect(0, 0, tex.width, tex.height), tex);

}

void Update(){
   Repaint ();
}
}
 

Parece que tienes asignada la textura como sprite. Mira a ver si te funciona como Texture.

Etiquetas: