x


GUI draws only one window at a time

I've got two objects in my scene that each draw their own windows and have selectionGrids assigned within. The problem I am running across is that only one of the two objects will draw when the scene is running. When one window is initialized it appears to not draw the other window and it does not discriminate on which one it decides to draw. Here is the base-code I am using for these GUIs:

 void OnGUI (){
    GUI.depth=depth;
        GUI.Window(0, windowRect, (GUI.WindowFunction)DoWindow,windowName,window);
    }   
    void DoWindow (int windowID) {             
       //begin scroll code
       scrollPosition = GUI.BeginScrollView (rScrollFrame, scrollPosition, rList, 
         game.scrollBox.horizontalScrollbar,game.scrollBox.verticalScrollbar);           
         selectionGrid=GUI.SelectionGrid(new Rect(frameSize.x,frameSize.y,frameSize.width,frameSize.height),selectionGrid,cont.CrewImages(),columns,GUIStyle.none);   
        GUI.EndScrollView();


    }
more ▼

asked Aug 23 '12 at 05:55 PM

Whelandrew gravatar image

Whelandrew
31 15 23 28

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

found it here

parameter: id

description: A unique ID to use for each window.

more ▼

answered Aug 23 '12 at 06:50 PM

ScroodgeM gravatar image

ScroodgeM
7.6k 2 6

That got both windows to draw to the screen! Thanks!

Aug 23 '12 at 07:37 PM Whelandrew
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3681
x201
x101
x62
x38

asked: Aug 23 '12 at 05:55 PM

Seen: 279 times

Last Updated: Aug 23 '12 at 07:37 PM