コード例 #1
0
    private void Awake()
    {
        Instance = this;

        graphicRaycaster    = uiRoot.GetComponent <GraphicRaycaster>();
        canvasRaycastTarget = uiRoot.GetComponent <CanvasRaycastTarget>();
        animator            = GetComponent <Animator>();
        audioSource         = GetComponent <AudioSource>();

        if (HelpManager.Instance.CurrentStep == TutorialStep.GrabBook)
        {
            //helpParticle.SetActive(true);
            helpOutline.enabled = true;
        }

        HelpManager.Instance.onCompleteTutorialStep += OnCompleteTutorialStep;

        startPos = transform.position;
        startRot = transform.rotation;
    }
コード例 #2
0
ファイル: UIManager.cs プロジェクト: SheaRembold/SparkleKitty
    private void Awake()
    {
        //Instance = this;

        graphicRaycaster    = GetComponentInChildren <GraphicRaycaster>();
        canvasRaycastTarget = GetComponentInChildren <CanvasRaycastTarget>();
        if (PlacementManager.Instance.IsUsingSteamVR)
        {
            graphicRaycaster.enabled    = false;
            canvasRaycastTarget.enabled = true;
        }
        else
        {
            canvasRaycastTarget.enabled = false;
            graphicRaycaster.enabled    = true;
        }

        for (int i = 0; i < transform.childCount; i++)
        {
            transform.GetChild(i).gameObject.SetActive(false);
        }
        mainUI.SetActive(true);
    }