static void Init() { // Get existing open window or if none, make a new one: BlenderSkyboxImageSplit window = (BlenderSkyboxImageSplit)EditorWindow.GetWindow(typeof(BlenderSkyboxImageSplit)); window.Show(); }
void OnGUI() { EditorGUILayout.LabelField("Splits an environment map image as exported from Blender into 6 separate images."); tex = (Texture2D)EditorGUILayout.ObjectField("Image", tex, typeof(Texture2D), false); if (GUILayout.Button("SPLIT")) { BlenderSkyboxImageSplit.Spilt(tex, Mathf.FloorToInt(tex.height / 2)); //tex = null; } EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField( "Source image must be:\n- sRGB color : true§- Alpha is Transparency: true\n- Non power of 2: None\n-Read/Write Enabled: true\n- Generate Mip Maps: false\n-Wrap Mode: Clamp\n- Filter Mode: Point(none)\n- Compression: None (importat)", GUILayout.MinHeight(300f) ); EditorGUILayout.EndHorizontal(); }