//end of editor launch functions// void loadAnimal(int index) { GameObject obj = Data.objects[index]; obj.AddComponent <AnimalAnimation>(); AnimalStats aStats = obj.AddComponent <AnimalStats>(); aStats.setType(obj.GetComponent <MainObject>().model); }
void animal() { string code = "while(1<3){walk 10 left 90;}"; //Data.currentCode = code; GameObject animal = GameObject.Instantiate(Data.files[0].file); AnimalAnimation _aa = animal.AddComponent <AnimalAnimation>(); AnimalStats __as = animal.AddComponent <AnimalStats>(); __as.setType(0); }