Set Gizmo to object in editor by c# script

I create my own custom null-objects with my menu and I’d like to set Icon to it. It will be great if it possible to use custom images.

alt text

It is very possible indeed to have custom gizmo images. Import the image you want to use into your project. Then you want to add this function to your monobehaviour.

    void OnDrawGizmos()
        Gizmos.DrawIcon(transform.position, "YourImage.png", true);

Obviously you need to replace the image path with the path to your gizmo image relative to the assets folder. The boolean at the end flags weather or not the gizmo allows scaling (true for scaling in 3d, false for constant size).

hope this helps.