Forum Discussion
Anonymous
6 years agoHow can I make my gameobject appear when I press the UI button on the canvas/menu
Hi forum. I'm fairly new to Unity and coding/scripting. I have a CAD-model in Unity and I can walk through it with my Oculus Rift VR gear. I have created a menu with two UI buttons as a start. The "Quit" button turns red when I hover over it, and when I click it the menu disappears and the gazepointer too.(which is what I planned)
The problem is, that when I press the other button a gameobject should appear in front of the player, but nothing happens? The buttons turns green as it should when I hover it and click it, but nothing happens? I tried dragging the gameobject to the buttons OnClick event, and set it as Set.Active etc. Nothing has been working so far.
Can anybody help me with this? :) It should be pretty straight forward but I cant get it to work. I tried a few scripts to make the gameobject appear 1 foot from the player in front the player, but this didnt work
The problem is, that when I press the other button a gameobject should appear in front of the player, but nothing happens? The buttons turns green as it should when I hover it and click it, but nothing happens? I tried dragging the gameobject to the buttons OnClick event, and set it as Set.Active etc. Nothing has been working so far.
Can anybody help me with this? :) It should be pretty straight forward but I cant get it to work. I tried a few scripts to make the gameobject appear 1 foot from the player in front the player, but this didnt work
Replies have been turned off for this discussion
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago