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
1
Question by Meatology · May 26, 2015 at 06:28 AM · script.inspectorassetscriptableobjectselection

Active Inspector Object

I am currently writing some CustomEditor's and ScriptableObject's to improve the workflow on my current project. To gain fast access to one instance of a ScriptableObject, I have created a MenuItem, that selects the asset, by using Selection.activeObject.

While this does show the properties in the Inspector, it also selects the asset in the project view itself, which I want to avoid.

Is there any way, that I can "select" an asset to be shown in just the Inspector? Specifically, I am looking for something like

 Inspector.activeObject = myObj;

Edit: My current workaround is a seperate custom EditorWindow script, which let's me display the asset properties without having to select it.
While this does work, it would still be nice, to get the approach with the Inspector working, so I don't have to create custom EditorWindows for each ScriptableObject I am creating.

Comment
Add comment · Show 1
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 godfreyidk · Apr 01, 2019 at 10:17 AM 0
Share

Hello @$$anonymous$$eatology,

I'm facing the same exact problem. But unlike you, i don't know how to begin with the work around you're mentioning. So if it's no problem to you, could you perhaps post your workaround code here, or on github. But only if you're okay with it. Or if you'd rather just briefly write out the steps, that would be appreciated too. Sorry to bother you.

Thank for reading.

Regards

Godfrey

1 Reply

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

Answer by crohr · May 28, 2015 at 07:12 AM

Unfortunately, there is no way to avoid the object being selected in the project, as Selection.activeObject is used to determine what to draw in the inspector. What is the reason you want to avoid this behavior, and maybe there is something different that could help you?

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 Meatology · May 28, 2015 at 01:07 PM 0
Share

The main reason is, so that I can inspect/preview assets in one folder, that I may want to assign to the ScriptableObject, and then inspecting the ScriptableObject, without having to browse to the assets again.
But if there is no way to do that, I will just stick to custom EditorWindows, which works quite well.

avatar image crohr · May 28, 2015 at 01:59 PM 0
Share

If you right-click the inspector tab you can lock the tab and open a second inspector tab to navigate to other objects.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Import Unity package / Asset by script with selection 0 Answers

[Solved]Why doesn't my ScriptableObject based asset save using a custom inspector ? 1 Answer

Why doesn't my ScriptableObject save using a custom EditorWindow? 3 Answers

ScriptableObject with references memory usage (help) 1 Answer

Access a ScriptableObject with missing Script via Code 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