UI interactivity
Hello! is there any way i can make a ui button interactable to open brush controller?
25 Replies
Hey! First off, I assume you mean the Default unity UI components?
(also, please don't double post! you had the right channel 🙂 )
yes! Unity's default ui and sorry for the double post!
Tilt/Open Brush's UI system is heavily opinionated, I'm not sure how easy this would be. Have you considered making your own open brush-style panel?
( @andybak might know more here)
Is this a button you're using from VR? I'd strongly recommend using Open Brush UI components for all VR UI
i can use open brush's UI system if it is easy to use. I just want a ui button to just enable a gameobject. Can you please tell me how to do that?
Have you read the dev notes?
No! where can i find that?
I've found it on your website!!
cool. 🙂
It's not amazing - but it's a good place to start.
and there's a fair bit about UI stuff
is this a button on an existing panel - or do you need a new panel as well?
I can use an existing panel or can create a new one! my main task is just to add a UI button!!
I hope you are getting my point!
In that cae - add it to an existing panel. That's easiest
1. Create a new monobehaviour with a single method that does what you want
2. Add a new ActionButton to a panel (copy an existing one)
3. Add your new monobehaviour to the button
4. connect the UnityEvent on the button to your new monobehaviour
ok let me try!!
Actually I am new to open brush. can you please tell me where the existing panel is?
what panel do you want ot add it to?
one with some empty space is probably best
Tools Panel?
yeah! tools panel will be good for this.
ok so - Prefabs/Panels/ToolPanel (but also ToolPanel_Mobile if you're building for Quest)
ok thanks! let me see!
Hey guys!
I just want to confirm one thing, by creating monobehaviour, you mean to create new script right?
well not just any new script - a new monobehaviour script (i.e. not just a plain C# class)
oh I got it
Actually i was a bit confused about the steps you told me yesterday
SO i have duplicated a UI button(I've duplicated undo button) from the tools panel. Can you explain the fourth point where you say: connect the UnityEvent on the button to your new monobehaviour
Undo is not an ActionButton
Check the type of each button
Duplicate an ActionButton not an OptionButton
oh ok
or just grab the prefab:
It is working fine!!
You guys are amazing!! Thank you!!!!!!!
actually i do have one more problem😅
What i have found is, your open brush xr rig should be enabled in the start of the app, otherwise, it behaves wierd(correct me if i am wrong).
actually I am using two different vr systems in one project i.e open brush and VRIF. I want VRIF rig in the start of the scene means when i start the project, the first xr rig should be vrif's and then after pressing a UI button, it should switch to open brush(enabling open brush and disabling vrif).
There was a project on github that turned Open Brush into one huge prefab and instantiated it when needed. Can't remember the name. @mikesky ?
That might predate the new XR plugin system though.
I've never tried to do anything like this so I don't know much that will help.
Nah, can't remember either sorry!
Ok thanks!
I am trying to find a solution. If i get one, i will tell you.