//MonoBehaviours void Start() { gameMgr = GameManager.Inst(); dialogueObj = Instantiate(Resources.Load("UI/Dialogue")) as GameObject; dialogueObj.transform.parent = gameObject.transform; //Setup dialogueGUI = dialogueObj.GetComponent <DialogueGUI>(); dialogueGUI.continueButton = continueButton; dialogueGUI.escapeButton = escapeButton; dialogueGUI.textSound = TextSound; dialogueGUI.DialogueCanvas.SetActive(false); }
public void Awake() { instance = this; lines = new ArrayList(); backgroundStyle.border.left = 22; backgroundStyle.border.right = 22; backgroundStyle.border.top = 24; backgroundStyle.border.bottom = 24; backgroundStyle.padding.left = 15; backgroundStyle.padding.right = 15; backgroundStyle.padding.top = 16; backgroundStyle.padding.bottom = 16; if (!dialogueSkin){ Debug.LogError("DialogueGUI.Awake(): dialogueSkin is not set."); } enabled = false; }