Скрипт на панельке
Синтаксис:
Используется csharp
for(int i=0;i<myQuest.myButtons.Count;i++)
{
GameObject g=Instantiate(buttonPrefab,this.transform.position,Quaternion.identity)as GameObject;
g.transform.SetParent(this.transform);
g.transform.localPosition=new Vector3(-350*Screen.width/1600f+i*350*Screen.width/1600f,-280*Screen.height/1030f,0);
g.transform.localScale*=Screen.width/1600f;
g.GetComponent<ButtonInterface>().TakeParams(myQuest.myButtons[i],myQuest);
}
{
GameObject g=Instantiate(buttonPrefab,this.transform.position,Quaternion.identity)as GameObject;
g.transform.SetParent(this.transform);
g.transform.localPosition=new Vector3(-350*Screen.width/1600f+i*350*Screen.width/1600f,-280*Screen.height/1030f,0);
g.transform.localScale*=Screen.width/1600f;
g.GetComponent<ButtonInterface>().TakeParams(myQuest.myButtons[i],myQuest);
}