Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by Froghut · Mar 16, 2010 at 08:50 AM · editor-scriptingwireframe

Hide wireframe of selected object/mesh

Whenever a gameobject containing a mesh is selected in the editor its mesh is overlayed with a wireframe. I know you can change the general color of that wireframe, but can I somehow change the color of it for only one object, or possibly don't show it at all?

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

3 Replies

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

Answer by hardwire · Jun 14, 2011 at 11:08 AM

You can hide the wireframe by calling

 EditorUtility.SetSelectedWireframeHidden(renderer, true);
Comment
Add comment · Show 3 · 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 FredericRP · Jan 24, 2013 at 05:10 PM 0
Share

Exactly what I was looking for, thanks !

avatar image steveh2112 · Sep 27, 2015 at 01:14 AM 0
Share

where would you put that line of code?

avatar image Zyl · Jan 13, 2017 at 06:00 PM 0
Share

Unfortunately this only works for perspective SceneViews. In othrographic mode the lines still show.

avatar image
-1

Answer by naruse · Mar 16, 2010 at 11:18 AM

Sorry, in the editor scene?, not possible to change it just for one object :(, maybe you can create a gizmo for it that assembles the mesh... but I'm not sure you are willing to do that :)

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 Froghut · Mar 16, 2010 at 01:45 PM 0
Share

Thats too bad ;/ but thanks anyways!

avatar image karl_ · Oct 11, 2012 at 05:01 AM 1
Share

This is incorrect, see answer below.

avatar image
0

Answer by ZonYX3D · Oct 18, 2013 at 03:00 AM

Sorry I'm starting to use unity but can you tell me where I need to put this command "EditorUtility.SetSelectedWireframeHidden(renderer, true); ? Thanks!

Comment
Add comment · Show 1 · 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 rutter · Oct 18, 2013 at 03:02 AM 0
Share

You would have to call it from an editor script. See Unity manual section "extending the editor" and $$anonymous$$enuItem documentation for a simple example which adds a command to the editor's top menu.

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

8 People are following this question.

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

Related Questions

Show/hide wireframe for the current selected object? 1 Answer

Material.mainTexture not working outside of runtime? 1 Answer

How do I get an array of names of all the sprites in a project, with an editor script? 2 Answers

Unity API for checking if an object was modified 3 Answers

How to minimize the main editor Window by script 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