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
376 5 6 9

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.

11 hours ago Hoeloe
(comments are locked)
10|3000 characters needed characters left

3 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
91 1 2

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
26.5k 151 171 256

(comments are locked)
10|3000 characters needed characters left

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

more ▼

answered Mar 06 '12 at 11:28 PM

kramcomposer gravatar image

kramcomposer
376 5 6 9

(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:

x4165
x37

asked: Mar 01 '12 at 09:30 PM

Seen: 6326 times

Last Updated: 11 hours ago