Hey, all, RiokuTheSlayer here again.
Just wonder, in a custom UI window, is there a way to make a certain thing like a GUI.box scale with the window?
Here’s what I have:
void OnGUI(){
if(treeObj==null){
treeObj = (GameObject)EditorGUILayout.ObjectField(treeObj,typeof(GameObject),true);
if(tree==null && treeObj != null){
tree=treeObj.GetComponent<ConversationTree>();
}
} else {
Rect box = new Rect(10,10,50,50); //This should be the rectangle of the window, with some minor changes I'll make myself to make it fit how I like
GUI.Box (box, "");
}
if(GUILayout.Button("Remove object"))
treeObj=null;//This is in case I make any changes to the object or need a new one to edit.
}
If you see anything else I can change, feel free to say! I’ll be happy to take any advice on custom windows, never done it.