Using Handles class

I want to make 2d label in 3d coordinates. I used Handles.Label to do it but i have some problems with it. When it works in editor it doesnt work in w2eb player:(

I editor I can write c# code like:

using UnityEditor;
...
...
...
	void OnGUI() {
                        Debug.Log("GuiMain"); 
		Handles.SetCamera(Camera.main);
		Handles.Label( localPlayerVector,  localPlayerNickname, localPlayerStyl);
	}

But when i compile it to run outside unity editor I have errors.

Documentation said that this script has to be in Assets/Editor… ok i put it there… but… then other c# scripts dont see it. For example MyEditorClass._function() doesn’t work And I cant attach it to any object…

There is one other problem… when it is in Editor folder void OnGUI() even don’t run ;(

What else shoud I do to use it?

Handles only works in Editor mode its not meant to be used while the game is actually running. Its suppose to be used for an extra tool.

Completely random off the top of my head –
Such as if you wanted to place one object exactly at 10.0f away from the another object you could possibly write up a little script and make a cube at one location and then make a cube at another and have it find how far they are apart and you could get the Distance to show in the Editor window…

When you use Editors your suppose to create them like

[Project Folder]
myObject

[Editor Folder]
myObjectEditor
[/Editor Folder]

[/Project Folder]

and the actual code should look like

using UnityEditor;

[CustomEditor(typeof(myObject))]
public class myObjectEditor : Editor
{

Where the editor basically just alters the values and such of that “myObject” class while still in the editor view. – This can easily be done as well in the Inspector but sometimes it would be a pain using certain structures… Like Linked Lists or Branching. Its handled much nicer with these Editors.

deleted

deleted