public override void OnPress(RaycastHit hitInfo) { if (parentPanel != null) { parentPanel.SetActiveButton(this); } else { Debug.LogError("Button not a child of VRPanel"); } }
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); }
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); } }
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); } }