private void InstantiateRemoteDrawer()
        {
            if (RemoteDrawerPrefab != null)
            {
                // Instantiate
                Debug.LogFormat("Instantiate: {0}", this.RemoteDrawerPrefab.name);
                Vector3    initPos = Vector3.zero;
                Quaternion initRot = Quaternion.identity;
                GameObject drawer  = PhotonNetwork.Instantiate(this.RemoteDrawerPrefab.name, initPos, initRot);

                if (drawer.GetComponentInChildren <PhotonView>().IsMine)
                {
                    drawer.transform.SetParent(RemoteDrawerParent.transform, false);
                }

                // Initial setup
                SimpleDrawerController drawerController = drawer.GetComponent <SimpleDrawerController>();

                // ここはそのうちやり方を変える

                drawerController.VRController = RemoteDrawerParent.transform.parent.parent.parent.GetComponent <VRTK_ControllerEvents>();
                drawerController.Initialize();

                RemoteRayCastDrawer rayCastDrawer = drawer.GetComponentInChildren <RemoteRayCastDrawer>();

                m_OnPenSpawn.OnNext(rayCastDrawer);
            }
        }
 public void Initialize()
 {
     this.VRController.TriggerPressed  += DoTriggerPressed;
     this.VRController.TriggerReleased += DoTriggerReleased;
     this.drawer = transform.GetComponentInChildren <RemoteRayCastDrawer>();
     this.drawer.RayCastEnabled = true;
     OnDrawTargetChange(WhiteBoard.DefaultTargetWhiteboard);
 }
 private void Initialize(RemoteRayCastDrawer ray)
 {
     remoteRayCastDrawer = ray;
 }