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 /
This question was closed Jul 24, 2013 at 09:37 PM by clunk47 for the following reason:

The question is answered, right answer was accepted

avatar image
3
Question by maikkel · Oct 08, 2010 at 09:50 PM · drawicongizmo

where are the icons for Gizmos.DrawIcon?

which icons are available for Gizmos.DrawIcon / where are they located?

Comment
Add comment · Show 3
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 clunk47 · Nov 27, 2012 at 10:27 PM 1
Share

Here's a really simple script I wrote to make this super easy to add custom icons to objects in the editor. All you have to do is attach this script to the object you want to have an icon drawn for. Then you need to make a new folder within the Assets folder called Gizmos. Put your textures you want to use as icons in this folder for this to work. Now you can just drag the icon you want from the Gizmos folder onto the script in the inspector, and it should appear right away. Let me know if this works :)

 using UnityEngine;
 using System.Collections;
 
 public class gizmo : $$anonymous$$onoBehaviour 
 {
     public Texture2D icon;
     
     void OnDrawGizmos()
     {
         if(icon)
             Gizmos.DrawIcon(transform.position, icon.name, true);    
     }
 }
avatar image ShawnFeatherly · Aug 03, 2018 at 05:56 PM 0
Share

Not sure why this question was closed... But wanted to add a great answer I found for Windows. http://eppz.eu/blog/unity-editor-icon-assets/ made a blog post on how to export all the icons. The top of the blog post links to script you can add to any unity project. The script adds a "Window/eppz/Icon" to the top menu bar. Once open, first press "get", then "save", then you'll have a bunch of icons in \Assets\Editor Default Resources\icons https://gist.github.com/eppz/bf0e0316102169445007924ae572562e

avatar image tarahugger · Jan 05, 2019 at 06:43 PM 0
Share

https://gist.github.com/$$anonymous$$attRix/c1f7840ae2419d8eb2ec0695448d4321

4 Replies

  • Sort: 
avatar image
5
Best Answer

Answer by skovacs1 · Oct 08, 2010 at 10:18 PM

As per the docs:

The icon's path can be found in the Assets/Gizmos folder or in the Unity.app/Contents/Resources folder.

Comment
Add comment · Show 4 · 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 maikkel · Oct 09, 2010 at 12:32 AM 0
Share

This is kind of weird, i dont have this folder in the Unity Directory (on Windows). When I use the example code from the Script Reference (Light Gizmo), I just get a black box... I made the icons myself and just put them into the Assets folder of my project.

avatar image skovacs1 · Oct 12, 2010 at 02:36 PM 1
Share

The docs are either assu$$anonymous$$g a Unix-based installation for Unity.app/Contents/Resources to exist or they are out-of-date. The Windows installation doesn't seem to have the files readily accessible that I can find, but likely has them built into some sort of resource file in Unity\Editor\Data\Resources. As per the first part of the docs, you would have to put them in Assets/Gizmos. This means that in the Windows installation at least, there are no icons available for use with Gizmos.DrawIcon by default as far as I can tell.

avatar image Talimar · Aug 29, 2011 at 03:35 AM 0
Share

Unity.app would refer to the name of your application/Content/Resources for use with Resources.Load()

avatar image agentsmith · Feb 16, 2012 at 07:21 AM 0
Share

I'd add that the docs read, " The image file should be placed in the Assets/Gizmos folder." For me "should" needs to be replaced with "must" or "has to", etc.

avatar image
2

Answer by agentsmith · Feb 16, 2012 at 07:23 AM

I'm using Windows 7 and it worked when I created a "Gizmos" folder inside the "Assets" folder ( "Assets\Gizmos\" ) and threw all the icon images in "Gizmos".

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

Answer by Veehmot · Feb 07, 2012 at 04:04 AM

You can't use built-in gizmos in code. A workaround is to set the gizmo for a script component. That gizmo will be set to whatever object attached to.

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

Answer by robertbeverly · Feb 18, 2011 at 11:03 PM

I'm using the OS X version, and found I need to create a Gizmos folder in the Assets directory (through the Unity interface). Then I can drop in any icons I want to use for gizmos and Unity will find them.

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

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Console error when trying to use gizmos? 2 Answers

Drawing a Range Icon in 3D Space 0 Answers

Unable to set a custom Gizmo icon "other" is missing 1 Answer

How to draw a Sprite on OnDrawGizmos() 0 Answers

Gizmos DrawIcon NOT located in Gizmos folder 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