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 YoloJero · Jul 11, 2018 at 05:07 PM · scripting problemgizmosiconcustomizationreuse

Is there a better way to have custom Script icons than Assets/Gizmos

I know this was asked a lot of times probably .. but it is very often answered wrong.


What I want is:
Use a custom icon for specific components/scripts in the Inspector (e.g. Figure 2 and Figure 3) and the Assets window (e.g. Figure 1) alt text


What I do so far:
For each component/script that shall have the icon I have an accroding Icon file in the folder

 Assets/Gizmos/<Path>/<To>/<Namespace>/<ClassName> icon


This is working fine.


However, I wondered if there is really no better way having to have a unique Icon file for each script. This makes the project/UnityPacke unnecessary huge. Also if I rename a class I always have to rename the according icon file as well ...


Therefore my question:
Is there any better way to have those icons for scripts/components? Preferably scripted and reusing ONE single icon file instead of having the same icon in multiple differently named files.


!NOTE! What I definitely do NOT want:
Show the Icon also in the Editor view for all GameObjects having those components attached (e.g. Figure 4). This is caused by either selecting the icon for this script via the Inspector as in Figure 5 (as allways suggested e.g. in this post or here and even by Unity - Assign Icons ) or using OnDrawGizmos or DrawGizmo alt text

example4.jpg (163.5 kB)
example1.jpg (197.8 kB)
Comment
Add comment · Show 2
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 hexagonius · Jul 11, 2018 at 08:44 PM 0
Share

have you taken a look at the meta file? I think its the place the icon is defined. with some scripting of that it might be possible

avatar image YoloJero · Jul 12, 2018 at 07:13 AM 0
Share

last screenshot. did you ever press the "other" button next to the icon color gizmos ;) ? Yes I did .. but this is useless ;) .. I do not want that everyone using my imported scripts has to manually disable the Gizmos in the SceneView. ... Unfortunately Unity is using the word "Gizmo" a little unconsequently and until now I didn't even find any documentation how the thing with the Gizmos folder works ... I have it from this community ;)


have you taken a look at the meta file? I think its the place the icon is defined. with some scripting of that it might be possible Hm yes I know that the icons are stored there ... but I'm not sure how I can change them by script ... Or do you mean I should change them all one by one?

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

86 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

Related Questions

How do I fit the bounds of custom gizmos in the Scene View? 0 Answers

Can't add script: The script is an editor script 2 Answers

how do i draw something in the scene for a property 0 Answers

Changing Unity Free splash screen and icon 1 Answer

Get gameobject gizmo icon by script 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