Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Damyan · Jan 06, 2011 at 12:20 PM · editortoolshandles

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?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by yoyo · Jan 06, 2011 at 05:49 PM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Jean-Fabre · Jan 06, 2011 at 01:42 PM

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

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Damyan · Jan 06, 2011 at 02:09 PM 1
Share

Thanks for pointing out the antares project, that looks interesting.

avatar image Ash-Blue · Jul 19, 2017 at 02:27 PM 0
Share

Sadly it looks like the link no longer exists :(

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

Changing collider's center changes the position of the position handle? wtf?! 1 Answer

Represent a AnimationCurve smoothly with Handles.Bezier 0 Answers

Custom brush tool? 0 Answers

What is the best way to use the Handles class to create custom gizmos. 1 Answer

How to read the current PivotRotation or PivotMode ? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges