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
3
Question by immersiveGamer · Jan 16, 2015 at 09:45 PM · editorpositionvertexsnaphandles

Editor Handles Vertex Snap not working on script's object.

Ok, so I am making an object that needs relative points. Since there are going to be a lot of these objects I didn't want to use an empty game object for each one of these relative points. After writing an editor script I can move the points in the scene view by using handles. Thankfully vertex snap works with this and I can snap the points to vertices on my object.

alt text

Only that was when the script that has the editor was on an empty child (this was because I was making this from a prototype that needed game objects and colliders and I needed it to be organized, hence starting off with a child object). Now that the script is on the root object the handles won't vertex snap to it.

Now I get why this is happening. Unity doesn't want to detect it's own object because it would be in the way, but that is not what I want and would like to override it. Is there a way around this? My first attempt was to deselect the object but that meant that the editor was disabled too (duh). I guess I could make it work by using an editor window that loads the points and then saves them back to the object I want ... but that seems like a lot of extra work on top of what I have done and another thing to keep updated. I would almost want to just use an empty child object.

blockwith handles.png (27.3 kB)
Comment
Add comment · Show 4
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 immersiveGamer · Feb 06, 2015 at 08:32 AM 0
Share

Because the project had to move along I did move everything to an editor window and it works fine but it is still a shame that I can't keep the editor on the actual object. I like to keep windows as abstracts or solely tools. So still looking out for a solution to the problem!

avatar image Bunny83 · Feb 06, 2015 at 09:36 AM 0
Share

You can keep an editor open by adding an additional inspector window in Unity, select the object with the custom inspector and press the lock icon on one of the inspector windows. Now when you deselect the object or when you selecting another object the locked inspector will still show the first selected object.

You can open as many Inspector windows you like (or you have space for :))

avatar image immersiveGamer · Feb 06, 2015 at 09:14 PM 0
Share

This worked. Since I only need one inspector I just deselect the object and move the handles after locking the inspector. I should have thought of that! But it is still a step that might be forgotten and then you need to unlock the inspector afterwards ... maybe i can lock and unlock the inspector using reflection http://answers.unity3d.com/questions/36131/editor-multiple-inspectors.html ... and then it might just break if source code changes.

avatar image DanjelRicci immersiveGamer · May 09, 2017 at 10:54 PM 0
Share

I now this comment comes VERY late, but thanks a lot for that! I really didn't think about the lock feature despite I use that a lot for other stuff. This just saved me a ton of time. :D

0 Replies

· Add your reply
  • Sort: 

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

27 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Get position of the closest visible vertex to mouse in scene view? 1 Answer

Showing Handles in the Game View 1 Answer

Rotation Snapping is adding harmful floats! 1 Answer

Scene Box/Rectangle Editor. Does one exist? 0 Answers

Snap to starting position? 3 Answers


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