how do i make it so that whenever i touch a gameobject with box collider, UI canvas appears? im newbie and really got stuck on this one…
What part of the first five touch and UI tutorials on Youtube did you have problems with?
How to report your problem productively in the Unity3D forums:
This is the bare minimum of information to report:
- what you want
- what you tried
- what you expected to happen
- links to documentation you used to cross-check your work (CRITICAL!!!)
- what actually happened, especially any errors you see
If you post a code snippet, ALWAYS USE CODE TAGS:
How to use code tags: Using code tags properly
The purpose of this forum is to assist people who are ready to learn by doing, and who are unafraid to get their hands dirty learning how to code, particularly in the context of Unity3D.
This assumes you have at least written and studied some code and have run into some kind of issue.
If you haven’t even started yet, go check out some Youtube videos for whatever game design you have in mind. There are already many examples of the individual parts and concepts involved, as there is nothing truly new under the sun.
If you just want someone to do it for you, you need go to one of these places:
https://livehelp.unity.com/?keywords=&page=1&searchTypes=lessons
Here, code for hide, unhide UIcanvas :
public GameObject canvas;
Allows you to drag your game object canvas.
canvas.gameObject.SetActive(true);
true means it will enable the GameObject’s canvas, if disabled, and vice versa with false.
If you cannot manage to use :
“OnCollisionEnter”, “Input.GetTouch”, a condition, …
I advise you to train yourself a little more.
Thank you!
Thanks!