Пример #1
0
    void getSeedFromOldScene()
    {
        //LOAD THIS WHEN SCENE IS LOADED
        GameObject UI_Obj = GameObject.FindGameObjectWithTag("UI");

        log = UI_Obj.GetComponent <UI_Logic>();
        if (log != null)
        {
            print("inside");
            seed = log.getCurrentSeed();
        }
        print("New Seed: " + seed);
    }
Пример #2
0
    void printSeed()
    {
        GameObject UI_Obj = GameObject.FindGameObjectWithTag("UI");
        UI_Logic   log    = UI_Obj.GetComponent <UI_Logic>();

        if (log != null)
        {
            seed = log.getCurrentSeed();
        }

        Button sb = Seed_Button.GetComponent <Button>();

        sb.GetComponentInChildren <Text>().text = "Seed: " + seed;
        sb.interactable = true;
    }