Gizmos DrawIcon NOT located in Gizmos folder

ok i’ve been trying to add an Icon for a gameObject, that is NOT located in the Gizmos folder, but in Resources for example.

Is there any way to do that? I can’t use Gizmos.DrawGUITexture, cuz it uses Rect, for position, so if i pass the position of the transform, it moves only in 2D plane (There is no input for the Z)…

If you add

   void OnDrawGizmos()

And in Unity you go to “GIzmoz”, under Scripts, there is the name of the script, that is drawing the Gizmo. From there i can pick an Icon that is everywhere in the Assets (Not just in Gizmos folder).

So how can i replicate that from code…

The relative path should work. For example for the folder Assets/Foo/Gizmos/icon.png"

   private void OnDrawGizmos()
        Gizmos.DrawIcon(transform.position, "../Foo/Gizmos/icon.png");