PopUpText.NewPopUp C# (CSharp) Method

NewPopUp() public method

public NewPopUp ( string setText ) : void
setText string
return void
    public void NewPopUp(string setText)
    {
        GameObject newPopUpTxt = Instantiate (popUp, popUp.transform.localPosition, popUp.transform.localRotation )as GameObject;

        newPopUpTxt.transform.parent = this.transform;
        newPopUpTxt.transform.localPosition = popUp.transform.localPosition;
        newPopUpTxt.transform.localScale = popUp.transform.localScale;
        newPopUpTxt.GetComponent<Text> ().text = setText;
    }