• 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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

Gizmos DrawIcon NOT located in Gizmos folder 0 Answers

Custom asset icons changed after upgrade to Unity 2017.2 0 Answers

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

Changing Unity Free splash screen and icon 1 Answer

Unity3d how to access Gizmos Tab in scene view via code 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges