예제 #1
0
    void CreateFBEvent(string name, int index)
    {
        GameObject item = Instantiate(EventFrontpageScrollPrefab);

        item.transform.SetParent(content);
        FrontpageObjects itemObject = item.GetComponentInChildren <FrontpageObjects>();

        itemObject.SetObjectInfo(name, index);
        frontpageobjects.Add(itemObject);
        FrontpageObjects temp = itemObject;


        // function til at slette prefab men find måde at gøre det hvis det overskrider en bestemt dato
        itemObject.GetComponent <Toggle>().onValueChanged.AddListener(delegate { CheckItem(temp); });
    }
예제 #2
0
 void CheckItem(FrontpageObjects item)
 {
     frontpageobjects.Remove(item);
 }