Quantcast
Channel: Questions in topic: "icon"
Viewing all articles
Browse latest Browse all 271

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

$
0
0
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][1]
**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//// 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](https://answers.unity.com/questions/32307/how-can-i-change-the-icon-of-a-script-within-the-p.html) or [here](https://stackoverflow.com/questions/25343084/how-to-create-a-script-icon-in-unity3d) and even by [Unity - Assign Icons](https://docs.unity3d.com/Manual/AssigningIcons.html) ) or using [OnDrawGizmos](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnDrawGizmos.html) or [DrawGizmo](https://docs.unity3d.com/ScriptReference/DrawGizmo-ctor.html) ![alt text][2] [1]: /storage/temp/120597-example1.jpg [2]: /storage/temp/120599-example4.jpg

Viewing all articles
Browse latest Browse all 271

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>