docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method LoadIcon

    LoadIcon(string, string, string)

    Load an icon regarding skin and editor resolution. Icon should be stored as legacy icon resources:

    • "d_" prefix for Professional theme
    • "@2x" suffix for high resolution
    Declaration
    public static Texture2D LoadIcon(string path, string name, string extention = ".png")
    Parameters
    Type Name Description
    string path

    Path to seek the icon from Assets/ folder

    string name

    Icon name without suffix, prefix or extention

    string extention

    [Optional] Extention of file (png per default)

    Returns
    Type Description
    Texture2D

    The loaded texture

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)