InfoScript.Start C# (CSharp) Method

Start() private method

private Start ( ) : void
return void
    void Start()
    {
        GameObject canvas = GameObject.Find ("Canvas");
        if (canvas != null) {
            GameObject go = Resources.Load<GameObject>("GameObjects/InfoPanel");
            if(go != null){
                infoPanel = Instantiate(go);
                infoPanel.GetComponent<Transform>().SetParent(canvas.GetComponent<Transform>(), false);
            }
        }
        state = GetComponent<GameState>();
    }
InfoScript