Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
4
Question by khellstr · Sep 28, 2013 at 04:57 PM · user interfacesceneviewhideselectshow

How do I hide object in scene editor?

I'd like to hide some gameObjects in scene editor; currently I'm placing "empty" gameobjects around my ship to simulate floating, but water, islands etc interferes my working. Now I disable mesh renderers from gameObjects I don't need to see or edit, but then those will not show up when I test my scene.

There has to better way, help please?

Also I'd like to have option to lock some objects. I want to see my ships hull, but not select or move it while editing those "floter" points. It's frustrating to spend most of time to find good viewpoint so I can select specific object.

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
17

Answer by Wordsonplay · Sep 04, 2015 at 03:27 AM

The Layers button in the top-right of the Unity editor window allows you to choose which layers you want to see in the scene view. So you can put your ship in a separate layer and then hide it. You can also 'lock' layers, so they are visible but can't be selected.

alt text


screen-shot-2015-09-04-at-113117-am.png (65.6 kB)
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 walrys · May 08, 2019 at 09:51 AM 0
Share

hello, is there a way I could do this programmatically? I'm looking for an editor script for this

avatar image
2

Answer by Bunny83 · Sep 28, 2013 at 05:19 PM

You can't really "lock" gameobjects, but you can hide them or prevent editing in the inspector by setting the hideFlags. Watch out since the hideFlags also controls if the object is serialized or not.

The HideFlags is a bitmask, so you can combine them with the binary or "|":

     public enum HideFlags
     {
         HideInHierarchy = 1,
         HideInInspector = 2,
         DontSave = 4,
         NotEditable = 8,
         HideAndDontSave = 13
 }

HideAndDontSave is already a combination of "NotEditable", "DontSave" and "HideInHierarchy"

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
1

Answer by Hoeloe · Sep 28, 2013 at 05:09 PM

Rather than specifically disabling mesh renderers, just disable the entire object, or better still, put them all as children of an empty object, and disable that. Then, re-enable it just before testing your scene. Unity does not have a built-in "lock" setting, but there are editor scripts you can download to do it, or you could write your own.

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

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

19 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

Related Questions

Show/hide GUI texture 2 Answers

Setting guiTexture to false works, but to true doesn't. 2 Answers

How to hide a character prefab 1 Answer

Hide/Show part of a GameObject 3 Answers

Object Visibility 2 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