コード例 #1
0
 public override void OnPress(RaycastHit hitInfo)
 {
     if (parentPanel != null)
     {
         parentPanel.SetActiveButton(this);
     }
     else
     {
         Debug.LogError("Button not a child of VRPanel");
     }
 }
コード例 #2
0
    public override void OnPress(RaycastHit hitInfo)
    {
        // this below line will basically run the OnPress method on GazeableObject
        // which will basically Debug.Log()
        // to know more check OnPress in GazeableObject class
        base.OnPress(hitInfo);

        // giving current active button as parameter
        // and SetActiveButton method going to set everythings for us
        parentPanel.SetActiveButton(this);
    }
コード例 #3
0
 public override void OnPress(RaycastHit hit)
 {
     base.OnPress(hit);
     if (parentPanel != null)
     {
         parentPanel.SetActiveButton(this);
     }
     else
     {
         Debug.LogError("Button not a child of object with VRPanel component.", this);
     }
 }
コード例 #4
0
    public override void OnPress(RaycastHit hitInfo)
    {
        base.OnPress(hitInfo);

        if (parentPanel != null)
        {
            parentPanel.SetActiveButton(this);
        }
        else
        {
            Debug.Log("Button is not a child of the parent with VR Panel component", this);
        }
    }