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
4
Question by Diet-Chugg · Sep 16, 2014 at 07:40 PM · editortools

What are the editor resources by name for EditorGUIUtility.Load Method?

According to http://docs.unity3d.com/ScriptReference/EditorGUIUtility.Load.html

Calling EditorGUIUtility.Load will try the built-in editor resources by name. I have found some at the following locations via some scripts I found online "icons/d_unityeditor.gameview.png", "icons/d_unityeditor.sceneview.png", and "icons/d_movetool.png"

but I believe there are more of them. I've been unable to locate the folder where they are hiding at.

Does anyone happen to know where the list of those names are? Or could help me find the folder with all the editor resources? I'm trying to make an editor tool and I'm specifically looking for the C# script image and the JS script image from Unity's internals but I don't know where to find them.

It may be possible to get what I'm looking for via AssetPreview.GetMiniTypeThumbnail which has helped me find other icons but it doesn't like being fed typeof(MonoBehaviour); and I'm not sure what else to try...

Any help with helping me find these images would be great, Thanks

Comment
Add comment · Show 5
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 Graham-Dunnett ♦♦ · Sep 16, 2014 at 08:48 PM 0
Share

/Applications/Unity/Unity.app/Contents/Resources/unity editor resources???

avatar image Graham-Dunnett ♦♦ · Sep 16, 2014 at 08:51 PM 1
Share

and possibly you want icons/generated/js script icon.asset and icons/generated/cs script icon.asset, if my use of strings is any help.

avatar image Diet-Chugg · Sep 16, 2014 at 09:42 PM 0
Share

Cool! Now I just need to know how to check a gameObject to see if it has a cs script or a js script and this tool is ready to roll!

avatar image Diet-Chugg · Sep 16, 2014 at 09:45 PM 0
Share

/Applications/Unity/Unity.app/Contents/Resources/unity editor resources

I think you are technically correct. Although I don't have a clue how'd you get inside that file and find out what's going on there.
avatar image vexe · Sep 17, 2014 at 07:22 AM 0
Share

That's not a file system address on Windows is it? I couldn't find it ... :s

6 Replies

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

Answer by vexe · Sep 17, 2014 at 07:21 AM

I don't think you need to know the location of the icons, nor their names if you want to get the preview for a certain object or type, nor if a script is JS or CS - you could just use AssetPreview.GetMiniThumbnail(UnityEngine.Object) and AssetPreview.GetMiniTypeThumbnail(System.Type)

If you still want the names, maybe you want to load the icons manually, I found this method in UnityEditorInternal.InternalEditorUtility, gives you all the icon names you need!

 public static Texture2D GetIconForFile(string fileName)
 {
     int num = fileName.LastIndexOf('.');
     string text = (num != -1) ? fileName.Substring(num + 1).ToLower() : string.Empty;
     string text2 = text;
     switch (text2)
     {
     case "boo":
         return EditorGUIUtility.FindTexture("boo Script Icon");
     case "cginc":
         return EditorGUIUtility.FindTexture("CGProgram Icon");
     case "cs":
         return EditorGUIUtility.FindTexture("cs Script Icon");
     case "guiskin":
         return EditorGUIUtility.FindTexture("GUISkin Icon");
     case "js":
         return EditorGUIUtility.FindTexture("Js Script Icon");
     case "mat":
         return EditorGUIUtility.FindTexture("Material Icon");
     case "prefab":
         return EditorGUIUtility.FindTexture("PrefabNormal Icon");
     case "shader":
         return EditorGUIUtility.FindTexture("Shader Icon");
     case "txt":
         return EditorGUIUtility.FindTexture("TextAsset Icon");
     case "unity":
         return EditorGUIUtility.FindTexture("SceneAsset Icon");
     case "asset":
     case "prefs":
         return EditorGUIUtility.FindTexture("GameManager Icon");
     case "anim":
         return EditorGUIUtility.FindTexture("Animation Icon");
     case "meta":
         return EditorGUIUtility.FindTexture("MetaFile Icon");
     case "ttf":
     case "otf":
     case "fon":
     case "fnt":
         return EditorGUIUtility.FindTexture("Font Icon");
     case "aac":
     case "aif":
     case "aiff":
     case "au":
     case "mid":
     case "midi":
     case "mp3":
     case "mpa":
     case "ra":
     case "ram":
     case "wma":
     case "wav":
     case "wave":
     case "ogg":
         return EditorGUIUtility.FindTexture("AudioClip Icon");
     case "ai":
     case "apng":
     case "png":
     case "bmp":
     case "cdr":
     case "dib":
     case "eps":
     case "exif":
     case "gif":
     case "ico":
     case "icon":
     case "j":
     case "j2c":
     case "j2k":
     case "jas":
     case "jiff":
     case "jng":
     case "jp2":
     case "jpc":
     case "jpe":
     case "jpeg":
     case "jpf":
     case "jpg":
     case "jpw":
     case "jpx":
     case "jtf":
     case "mac":
     case "omf":
     case "qif":
     case "qti":
     case "qtif":
     case "tex":
     case "tfw":
     case "tga":
     case "tif":
     case "tiff":
     case "wmf":
     case "psd":
     case "exr":
         return EditorGUIUtility.FindTexture("Texture Icon");
     case "3df":
     case "3dm":
     case "3dmf":
     case "3ds":
     case "3dv":
     case "3dx":
     case "blend":
     case "c4d":
     case "lwo":
     case "lws":
     case "ma":
     case "max":
     case "mb":
     case "mesh":
     case "obj":
     case "vrl":
     case "wrl":
     case "wrz":
     case "fbx":
         return EditorGUIUtility.FindTexture("Mesh Icon");
     case "asf":
     case "asx":
     case "avi":
     case "dat":
     case "divx":
     case "dvx":
     case "mlv":
     case "m2l":
     case "m2t":
     case "m2ts":
     case "m2v":
     case "m4e":
     case "m4v":
     case "mjp":
     case "mov":
     case "movie":
     case "mp21":
     case "mp4":
     case "mpe":
     case "mpeg":
     case "mpg":
     case "mpv2":
     case "ogm":
     case "qt":
     case "rm":
     case "rmvb":
     case "wmw":
     case "xvid":
         return EditorGUIUtility.FindTexture("MovieTexture Icon");
     case "colors":
     case "gradients":
     case "curves":
     case "curvesnormalized":
     case "particlecurves":
     case "particlecurvessigned":
     case "particledoublecurves":
     case "particledoublecurvessigned":
         return EditorGUIUtility.FindTexture("ScriptableObject Icon");
     }
     return EditorGUIUtility.FindTexture("DefaultAsset Icon");
 }



EDIT:

Not icons, but also relevant - some GUI internal styles including the toolbarSearchField (the search field that's used in the hierarchy and project views)

 // UnityEditor.EditorStyles
 private void InitSharedStyles()
 {
     this.m_ColorPickerBox = this.GetStyle("ColorPickerBox");
     this.m_InspectorBig = this.GetStyle("In BigTitle");
     this.m_MiniLabel = this.GetStyle("miniLabel");
     this.m_LargeLabel = this.GetStyle("LargeLabel");
     this.m_BoldLabel = this.GetStyle("BoldLabel");
     this.m_MiniBoldLabel = this.GetStyle("MiniBoldLabel");
     this.m_WordWrappedLabel = this.GetStyle("WordWrappedLabel");
     this.m_WordWrappedMiniLabel = this.GetStyle("WordWrappedMiniLabel");
     this.m_WhiteLabel = this.GetStyle("WhiteLabel");
     this.m_WhiteMiniLabel = this.GetStyle("WhiteMiniLabel");
     this.m_WhiteLargeLabel = this.GetStyle("WhiteLargeLabel");
     this.m_WhiteBoldLabel = this.GetStyle("WhiteBoldLabel");
     this.m_MiniTextField = this.GetStyle("MiniTextField");
     this.m_RadioButton = this.GetStyle("Radio");
     this.m_MiniButton = this.GetStyle("miniButton");
     this.m_MiniButtonLeft = this.GetStyle("miniButtonLeft");
     this.m_MiniButtonMid = this.GetStyle("miniButtonMid");
     this.m_MiniButtonRight = this.GetStyle("miniButtonRight");
     this.m_Toolbar = this.GetStyle("toolbar");
     this.m_ToolbarButton = this.GetStyle("toolbarbutton");
     this.m_ToolbarPopup = this.GetStyle("toolbarPopup");
     this.m_ToolbarDropDown = this.GetStyle("toolbarDropDown");
     this.m_ToolbarTextField = this.GetStyle("toolbarTextField");
     this.m_ToolbarSearchField = this.GetStyle("ToolbarSeachTextField");
     this.m_ToolbarSearchFieldPopup = this.GetStyle("ToolbarSeachTextFieldPopup");
     this.m_ToolbarSearchFieldCancelButton = this.GetStyle("ToolbarSeachCancelButton");
     this.m_ToolbarSearchFieldCancelButtonEmpty = this.GetStyle("ToolbarSeachCancelButtonEmpty");
     this.m_SearchField = this.GetStyle("SearchTextField");
     this.m_SearchFieldCancelButton = this.GetStyle("SearchCancelButton");
     this.m_SearchFieldCancelButtonEmpty = this.GetStyle("SearchCancelButtonEmpty");
     this.m_HelpBox = this.GetStyle("HelpBox");
     this.m_AssetLabel = this.GetStyle("AssetLabel");
     this.m_AssetLabelPartial = this.GetStyle("AssetLabel Partial");
     this.m_AssetLabelIcon = this.GetStyle("AssetLabel Icon");
     this.m_SelectionRect = this.GetStyle("selectionRect");
     this.m_MinMaxHorizontalSliderThumb = this.GetStyle("MinMaxHorizontalSliderThumb");
     this.m_BoldFont = this.GetStyle("BoldLabel").font;
     this.m_StandardFont = this.GetStyle("Label").font;
     this.m_MiniFont = this.GetStyle("MiniLabel").font;
     this.m_MiniBoldFont = this.GetStyle("MiniBoldLabel").font;
     this.m_ProgressBarBack = this.GetStyle("ProgressBarBack");
     this.m_ProgressBarBar = this.GetStyle("ProgressBarBar");
     this.m_ProgressBarText = this.GetStyle("ProgressBarText");
     this.m_FoldoutPreDrop = this.GetStyle("FoldoutPreDrop");
     this.m_InspectorTitlebar = this.GetStyle("IN Title");
     this.m_InspectorTitlebarText = this.GetStyle("IN TitleText");
     this.m_ToggleGroup = this.GetStyle("BoldToggle");
     this.m_NotificationText = this.GetStyle("NotificationText");
     this.m_NotificationBackground = this.GetStyle("NotificationBackground");
     this.m_Popup = (this.m_LayerMaskField = this.GetStyle("MiniPopup"));
     this.m_TextField = (this.m_NumberField = this.GetStyle("textField"));
     this.m_Label = this.GetStyle("ControlLabel");
     this.m_ObjectField = this.GetStyle("ObjectField");
     this.m_ObjectFieldThumb = this.GetStyle("ObjectFieldThumb");
     this.m_Toggle = this.GetStyle("Toggle");
     this.m_ToggleMixed = this.GetStyle("ToggleMixed");
     this.m_ColorField = this.GetStyle("ColorField");
     this.m_Foldout = this.GetStyle("Foldout");
     this.m_FoldoutSelected = GUIStyle.none;
     this.m_TextArea = new GUIStyle(this.m_TextField);
     this.m_TextArea.wordWrap = true;
     this.m_InspectorDefaultMargins = new GUIStyle();
     this.m_InspectorDefaultMargins.padding = new RectOffset(14, 4, 0, 0);
     this.m_InspectorFullWidthMargins = new GUIStyle();
     this.m_InspectorFullWidthMargins.padding = new RectOffset(5, 4, 0, 0);
 }


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
4

Answer by Wom · Oct 18, 2014 at 06:07 AM

This is not my list, I found it by Googling for "d_console.erroricon.png": https://gist.github.com/masa795/5797164

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 vexe · Oct 18, 2014 at 10:17 AM 0
Share
  • Good list. Nice addition

avatar image iwaldrop · Feb 14, 2015 at 07:17 AM 0
Share

That link went belly up.

avatar image
2

Answer by ktmarine1999 · Feb 01, 2017 at 09:28 AM

There is an Editor Script on the UnifyWiki called Show Built In Resources you can find it at http://wiki.unity3d.com/index.php/Show_Built_In_Resources

Copy/paste this code into a file called BuiltInResourcesWindow.cs, and put it in an Editor folder. Then select Window / Built-in styles and icons.

This will show an editor window with all of the built in styles and icons. Once you find the one you want click on the button, this will copy the code for that style or icon. alt text

Then go to your script editor and past the code. alt text

In your case for the C# script Icon EditorGUIUtility.FindTexture( "cs Script Icon" ) this will return the C# script icon as a texture.


editor-built-in-resources-c-icon.png (10.0 kB)
editor-built-in-resources-paste.png (8.3 kB)
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
2

Answer by Socapex · Feb 27, 2017 at 01:45 AM

I made a free extension to show builtin icons. https://www.assetstore.unity3d.com/en/#!/content/70496

Cheers

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 booferei · Apr 18, 2021 at 07:38 PM 0
Share

Thanks a lot!

avatar image booferei · Apr 18, 2021 at 07:39 PM 0
Share

URL has changed: https://assetstore.unity.com/packages/tools/utilities/unity-internal-icons-70496 (For the next time the link breaks, it's called "Unity Internal Icons")

avatar image
0

Answer by zwcloud · Apr 27, 2016 at 03:11 AM

I found the help icon in the header of components' inspector GUI. EditorGUIUtility.IconContent("_Help"); the help icon


help.png (646 B)
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
  • 1
  • 2
  • ›

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

33 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

Related Questions

How Can I Move an Object in the Editor by MousePosition? 0 Answers

Edit animation in animation windows 1 Answer

How to get GameObjects used in AnimationClip 1 Answer

How do I make a tool that allows me to modify variables in scripts that are not MonoBehaviour? 1 Answer

Capture input events before scene view does? 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