x


How to make a Custom Editor in C#

Trying to learn how to make a custom editor in C# If anyone has some good C# Tutorials for a Custom editor, or even some really good references, I would really appreciate it.

PLEASE DO NOT LINK Unity Script or Java Script, I've tried looking at java stuff, and it doesn't seem to translate well. Thank you

ive already looked at this page : http://unity3d.com/support/documentation/Components/gui-ExtendingEditor.html , but its all java :(

more ▼

asked Mar 01 '12 at 09:30 PM

kramcomposer gravatar image

kramcomposer
466 7 11 14

I did just find a decent example..but looking more for a tutorial http://buchhofer.com/2011/05/scriptable-objects-and-custom-editors/

Mar 01 '12 at 11:03 PM kramcomposer

I feel I should point out that Java =/= Javascript.

May 23 '13 at 01:37 PM Hoeloe

Java != Javascript != UnityScript

Jul 11 '13 at 03:15 PM flamy

The C# Editors Control for Windows Forms application is flexible data entry controls.

Sep 02 '13 at 10:02 AM Malcolmaloe
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

I've written an article that covers writing a basic Custom Editor using C#

See: Using Custom Editors in Unity - C# example

Example from the article:

// MyScriptEditor.cs
using UnityEditor;

[CustomEditor(typeof(MyScript))] 
public class MyScriptEditor : Editor {

    public override void OnInspectorGUI() {
        MyScript myTarget = (MyScript) target;
        myTarget.MyValue = EditorGUILayout.IntSlider("Val-you", myTarget.MyValue, 1, 10);
    }
}
more ▼

answered Oct 21 '12 at 03:10 PM

MorePieNow gravatar image

MorePieNow
151 1 1 2

I did just find a decent example..but looking more for a tutorial http://buchhofer.com/2011/05/scriptable-objects-and-custom-editors/

Mar 06 '12 at 11:28 PM kramcomposer

top quality article there ..

Oct 21 '12 at 03:11 PM Fattie
(comments are locked)
10|3000 characters needed characters left
more ▼

answered Mar 01 '12 at 09:50 PM

DaveA gravatar image

DaveA
32.4k 158 176 278

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x7607
x63

asked: Mar 01 '12 at 09:30 PM

Seen: 22484 times

Last Updated: Sep 02 '13 at 10:02 AM