Beispiel #1
0
    /// <summary>
    /// This is used in here and in options panel controller.
    /// </summary>
    public GameObject InstantiateWarning(string prefabAddress)
    {
        GameObject myPrefab = (GameObject)Resources.Load(prefabAddress);
        GameObject panel    = (GameObject)Instantiate(myPrefab);

        // Used to ensure correct orientation
        uiManager.SetUpPanel(panel, myPrefab);
        // But SetUpPanel leaves the gameObject inactive!
        panel.SetActive(true);

        return(panel);
    }