Exemple #1
0

        
    void Start()
    {
        //Get the payload
        payload = transform.parent.GetComponentInChildren <PayloadScript> ();
        //If there is no payload, create new Empty payload
        if (payload == null)
        {
            payload = new Empty();
        }

        print(payload.type);
        //Set type
        type = payload.type;
        //If the ID isn't set, print
        if (ID == -1)
        {
            print("ID not set on" + name);
        }
    }