Is it possible to add new tools, like transform/rotate/scale?

I'm writing a spline editor and for each point on my spline I have some additional properties that I want the user to be able to edit in the scene. One such property might be "width". I'm using a Handles.ScaleValueHandle() for this, but this interferes with the handle that is drawn for transform/rotate/scale. If I'm in the Hand Tool then things look a bit better, but then I need to change tool to select another point.

What I'd ideally like to be able to do is to add a new tool that sits next to the hand/transform/rotate/scale tools to let me go into my own editing mode. Is this sort of thing possible?

I notice that the terrain editor has some number of tools that you can select. Is it possible to do this sort of thing in my own script?

You can create a custom editor for a type, which will be active whenever a component of that type is active in the inspector. (As Jean F says, you can create an editor for Transform, which will then be active for all objects, since they all have transforms -- but it sounds like you just need your editor to be available when your spline component is selected.)

This custom editor can then implement OnSceneGUI, where you can render your gizmo handles and deal with user input.

I don't know if there's a way to add a new button to the scene view toolbar, but if you can stomach the use of reflection to call private members you might be able to inject something into the standard scene view. See this question for an example of these sorts of shenanigans. Alternatively you could add a menu item with a hotkey to activate your manipulator.

hi,

Have you checked the antares project?

You could write your own transform inspector and add more items to trigger your own editing tools

check this ( if you don't know it already):

http://www.unifycommunity.com/wiki/index.php?title=TransformInspector

This is a rewriting version of the transform Inspector and a good start to build such editor scripts.

You can then add your own gui , tools and info within that new transform Inspector on ALL of your models. This might be what you are looking for.

Bye,

Jean