/// <summary>
        /// Instantiates the default interactable button.
        /// </summary>
        private void InstantiateHandCoach(out HandInteractionHint handCoach)
        {
            // Load HandCoach prefab.
            GameObject handCoachPrefab = AssetDatabase.LoadAssetAtPath(handCoachRightPath, typeof(Object)) as GameObject;

            handCoachPrefab.GetComponentInChildren <HandInteractionHint>().AutoActivate = false;

            GameObject handCoachGameObject = Object.Instantiate(handCoachPrefab) as GameObject;

            Assert.IsNotNull(handCoachGameObject);

            handCoach = handCoachGameObject.GetComponentInChildren <HandInteractionHint>();
            Assert.IsNotNull(handCoach);
        }
Esempio n. 2
0
        /// <summary>
        ///     初期化処理を実施します
        /// </summary>
        private void OnEnable()
        {
            if (isInitialized)
            {
                return;
            }

            isInitialized        = true;
            manipulationHandler  = GetComponent <ManipulationHandler>();
            interactionGrabbable = GetComponent <NearInteractionGrabbable>();
            handInteractionHint  = GetComponentInChildren <HandInteractionHint>();
            arrowAnimate         = GetComponentInChildren <ArrowAnimate>();
            toolTip = GetComponentInChildren <ToolTip>();
            systemKeyboardInputHelper = GetComponentInChildren <SystemKeyboardInputHelper>();
            pos1 = handInteractionHint.transform.GetChild(1).transform.position;
            pos2 = handInteractionHint.transform.GetChild(2).transform.position;
        }