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
2
Question by Wolfram · Jan 22, 2021 at 12:09 PM · custom editorcustom-inspectorprefab-instanceoverridecustom inspector

Custom editor window does not show prefab overrides

Hiho.

We have written a custom Tranform inspector with a few useful buttons. However, when modifying a prefab instance, this inspector does not show the bold override text, and does not mark the override with the blue line on the left side, they can only be seen in Debug mode.

alt text

How do we need to modify the script to support this vital functionality?

Thanks!

1custominspector.png (47.4 kB)
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
-2

Answer by Bunny83 · Jan 22, 2021 at 12:53 PM

Well, what exactly are you expecting as answer? You clearly did not pay attention to prefab overrides and maybe even forgot about multiobject editing. How should we know what you did in your custom inspector? All we can see is that you did not implement it properly.

For those functionalities implementing some context menu buttons may make more sense. The transforminspector is a quite complex beast. For example in animation edit mode the captured field are usually marked red.

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 Wolfram · Jan 22, 2021 at 01:31 PM 0
Share

Well, a pointer to some ressources or documentation regarding these features would be nice, as I did not find any, not even in the official documentation pages that deal with custom editors.

And it's not limited to the Transform inspector - ANY custom inspector that you want to have the same look-and-feel as "official" inspectors will need to take care of this.

Is it simply a certain command/check that needs to be added ("if(isPrefabOverride(EditorGUIObject))..."), or does everybody who wants to create any custom inspector have to take care of all of these issues from scratch, and re-implement the wheel each time ("private void DrawOverrideLineOnLeftHandSide(){ // some GL commands... }")?

avatar image
0

Answer by Eck · Feb 11, 2021 at 04:30 PM

I just ran into this problem too @Wolfram.

.

Apparently there's a EditorGUI helper BeginProperty/EndProperty that you need to wrap properties in. This will show the bolded labels for overridden prefab properties. This post goes into a little more detail: https://forum.unity.com/threads/solved-c-custom-property-drawers-label-text-not-showing.771122/

.

Eck

https://ecktechgames.com/

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

118 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to Hide/Show List or Array in the inspector based on a variable? 0 Answers

Dictionary becomes null unexpectedly when using a custom inspector 2 Answers

Events in custom inspector 1 Answer

Getting a target's gameobject in custom editor 1 Answer

Custom editor values set in prefab editor not set in prefab asset 0 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