Skip to content

Polish-Coder/Extended-Editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extended-Editor

A plugin for Unity that helps you write your own custom editors.

Installation

To install this plugin follow the instructions below. Make sure you have installed all required packages.

Requirements

  • Unity v. 2020 or newer

Installing the plugin

Import all repository files to your Assets folder. Only folder called Examples is unnecessary.

Usage

This plugin contains 2 classes:

  • ExtendedEditor.cs - All editor functions
  • ExtendedStyle.cs - Style class for editor elements

Extended Editor

Text Example of using Text:
ExtendedEditor.Text("Example Text");
Button Example of using Button:
if(ExtendedEditor.Button("Example Button")) { // What happens when the button is clicked }
Image Example of using Image:
ExtendedEditor.Image(Resources.Load<Texture>("Textures/Example Image"));
Space Example of using Space:
ExtendedEditor.Space(10);
Divider Example of using Divider:
ExtendedEditor.Divider(5);
Menu Example of using Menu:
int selectedMenu = 0; void OnGUI() { ExtendedEditor.Menu(ref selectedMenu, new string[] { "Tab 1", "Tab 2", "Tab 3" } ); switch (selectedMenu) { case 0: // Page 1 break; case 1: // Page 2 break; case 2: // Page 3 break; } }
Layouts Example of using HorizontalLayout:
ExtendedEditor.HorizontalLayout(() => { // code });

Example of using VerticalLayout:

ExtendedEditor.VerticalLayout(() => { // code });

Example of using AreaLayout:

ExtendedEditor.AreaLayout(new Rect(0, 0, 350, 250), () => { // code });
Fields Example of using ObjectField:
GameObject obj; void OnGUI() { obj = (GameObject)ExtendedEditor.ObjectField(new Rect(0, 0, 100, 35), obj, typeof(GameObject), false); }

Example of using TextField:

string text; void OnGUI() { ExtendedEditor.TextField(new Rect(0, 0, 100, 35), ref text); }

Author

This plugin is made by Polish Coder

About

A plugin for Unity that helps you write your own custom editors

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages