public virtual void SetupTutorialPanel() { tutorialPanel.Show(); tutorialPanel.ToggleHand(showHand); if (showHand) { tutorialPanel.SetHandTransform(handLocalPosition, handLocalRotation, handLocalScale); } if (showText) { tutorialPanel.SetTextTransform(textLocalPosition, textLocalRotation, textSize); } tutorialPanel.SetText(text, textColor, fontSize, alignment); SetupBackgroundMask(); }
// Start is called before the first frame update void Start() { // Creates tutorial instances foreach (TutorialDescriptor tutorialDescriptor in TutorialList) { int index = TutorialList.IndexOf(tutorialDescriptor); TutorialPanel tutorialPanel = Instantiate(TemplateTutorialPanel, this.transform); tutorialPanel.SetText(tutorialDescriptor.ExplanationText); tutorialPanel.SetPage(index + 1, TutorialList.Count); tutorialPages.Add(tutorialPanel); tutorialPanel.gameObject.SetActive(index == 0); // By default just the first page shall be active } if (tutorialPages.Count == 0) { TutorialButton.gameObject.SetActive(false); } }