- Home /
 
Add an image/texture to a custom editorwindow
Hey, I have created a script that opens a pop up window in the editor with 4 buttons that for now, do nothing. This is the script
 using UnityEngine;
 using UnityEditor;
 
 public class AngleSimulator: EditorWindow
 {
 
 
     [MenuItem ("Custom/Tools/AngleSimulator")]
     static void Init () {
 
         AngleSimulator window = (AngleSimulator)EditorWindow.GetWindow (typeof (AngleSimulator));
         window.Show();
     }
 
     void OnGUI ()
   {
     
     if (GUILayout.Button("Start"))
     {
       //rotation = StartAngle
     }
 
     if (GUILayout.Button("End"))
     {
       //rotation = EndAngle
     }
 
     if (GUILayout.Button("Simulate"))
     {
       //slerp(StartAngle, EndAngle)
     }
 
     if (GUILayout.Button("Refresh"))
     {
       //Update
     }
 
     }
 }
 
               And this is how it looks: http://prntscr.com/9iouds
Now I would like to put an image/texture above these 4 buttons , how could I do this? So just that I have like a .jpg file in my assets folder and that it is displayed above the 4 buttons, tyvm!!
,
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
How to build an editor window with a treeview widget? 4 Answers
Texture2D not showing in build, but shows up in editor 1 Answer
Why are all my GUITexture elements semi-transparent? 0 Answers
Creating a window to get user's textures for a tilemap. 0 Answers
Editor scripting: Part of a texture as button content 1 Answer