public struct TheWindow{
public Rect WinRect;
public string Title;
public int ID;
}
public class AEditorWindow: EditorWindow{
public TheWindow[] SomeWindows;
void AddAnotherWindowToArray() {
// unknown code.
}
I know that i could go with ArrayList or something in that direction, but it seems that one does not have just as much control with arraylists, so this is the way i selected. the question then is, how do you add a new stuct to that array?
The length of an array is immutable once allocated; you can either create a new array with a larger length and copy the existing data into it, or use a type such as ArrayList, List, etc, in the first place.
If you want to use the .net built in array, you have to write you own function to copy paste from the original array to a temp holder array with size +1 and then recreate the old array copy back from the temp holder array to the original array and assign the new value to the last in the array. Hope that helps.