The Handles class has a function Handles.DrawSelectionFrame(). Here's the useless official documentation for this function:

Draw a camera facing selection frame.

When I call this function, nothing is displayed. Other handles seem to work fine.

    void OnDrawGizmos() { //results are same in OnSceneGUI in an Editor
        Handles.color = Color.red;
        Handles.DrawLine(transform.position, transform.position + Vector3.up * 100)); //shows up
        Handles.Label(transform.position, "Hello World"); //shows up
        int i = -1;
        //is the size in world units? pixels? the documentation doesn't say
        for (float size = .5f; size  < 1000; size  *= 2) {
            //nothing shows up
            Handles.DrawSelectionFrame(i, transform.position, Quaternion.identity, size, EventType.MouseMove);

How is this function supposed to be used?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.