what I’m trying to do is not creating loads and loads of arrays but 1 BIG array and separate it by numbers so to say
my structure
using UnityEngine;
using System.Collections;
public struct ExpandRect {
public void ExpandF(Rect FirstRect, ref Rect[] Expandable, ref float LastRectY){
int i=0 ;
for (; i<Expandable.Length; i++) {
Expandable <em>= new Rect (FirstRect.x + FirstRect.width, (FirstRect.y + Expandable<em>.height * i) ,Expandable_.width, Expandable*.height);*_</em></em>
* }*
LastRectY = Expandable_.y + Expandable*.height;
}
}
# and I’m calling the structure*
public Rect[] SkillButtonRec = new Rect[200];_
public float SHeight = 20 ;
public float SWidth = 50 ;
public ExpandRect ExpaRec;
float lastpos = 0;
* ExpaRec.ExpandF(new Rect(0,0,SWidth,SHeight), ref SkillButtonRec[1 - 3], ref lastpos);*
* if (SkillNameb[0] = GUI.Toggle((SkillButtonRec[0] = new Rect(0,0,SWidth,SHeight)) ,SkillNameb[0], SkillName[0] )){*
// GUI.Toggle(SkillNameb[1], SkillName[1]);
// GUI.Toggle(SkillNameb[2], SkillName[2]);
// GUI.Toggle(SkillNameb[3], SkillName[3]);
this:
Rect(0,0,SWidth,SHeight), ref SkillButtonRec[1 - 3], ref lastpos);
is what I’m trying to achive is it possible or I must create loads of arrays and call give them whole afterwords?
thanks in advance
yes I know I could use 50 times begin horizontal and begin vertical but that gives me headache especially for so complicated gui I want to have
this 1 step is easy to make with that but doing it 30 of them is different story