Unity Spain

Post Antiguos => General (Antiguo) => Mensaje iniciado por: enrique.perez en Octubre 28, 2015, 04:33:05 PM

Título: EditorWindow
Publicado por: enrique.perez en Octubre 28, 2015, 04:33:05 PM
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 ();
}
}
 
 (//<fileStore.core_Attachment>/monthly_2015_10/resultado.png.a63737504787d96236c62a6cd7bfb233.png)
Título: EditorWindow
Publicado por: kaito en Octubre 28, 2015, 08:19:36 PM
Parece que tienes asignada la textura como sprite. Mira a ver si te funciona como Texture.