x


Multi-Object Editing not supported

I have just tried to script an editor script, and it just shows "multi-object editing not supported," and nothing else. the script:

#pragma strict

@CustomEditor(PlayerController) @CanEditMultipleObjects

class PlayerEditor extends Editor{

var Speed: float = 0.0;
var SProp: SerializedProperty;

function OnEnable(){
    SProp = serializedObject.FindProperty("MSpeed");
}

function OnInspectorGUI(){
    serializedObject.Update();
    Speed = EditorGUILayout.Slider(Speed, 1, 150);
    if(!SProp.hasMultipleDifferentValues){
       PBar(SProp / 100.0, Speed);
    }

}

function PBar(val: float, label: String){
    var rect: Rect = GUILayoutUtility.GetRect(18, 18, "Text Field");
    EditorGUI.ProgressBar(rect, val, label);
    EditorGUILayout.Space();
}

}

is here. any help would be much appreciated. thanks in advance

more ▼

asked May 11 '12 at 03:01 AM

LockonS gravatar image

LockonS
11 2 3 3

You should describe what your script is supposed to do. You should also describe and identify the line at which error message was displayed/reported.

May 11 '12 at 03:57 AM kolban

there is no line that the editor specifies as to having an error, as for what it's supposed to do.. well, its supposed to show a slider that changes the variable 'MSpeed" of the player. however, in the inspector, it just shows "multi-object edition not supported." thanks for the reply :D also, i'm sorta new to scripting for the editor.

May 14 '12 at 02:55 AM LockonS
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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:

x1665
x1091
x520
x22
x7

asked: May 11 '12 at 03:01 AM

Seen: 1519 times

Last Updated: May 14 '12 at 02:55 AM