This repository was archived by the owner on Sep 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
VRCEUiButton
AtiLion edited this page Oct 18, 2019
·
3 revisions
Requires The VRChat.UI namespace
Creates a new button, positions it and sets it for you.
Parameters
- name - The name of the button gameobject(needs to be unique)
- position - The position of the button relative to the parent(use in hundreds)
- text - The text inside of the button
- parent - The button's parent gameobject.
VRCEUiButton button = new VRCEUiButton("btnTest", new Vector2(0f, 0f), "Test Button", userMenu);
Returns true if the component has been successfully created.
Returns the root Transform of the component.
Returns the Transform that contains the Button.
Returns the Transform that contains the Image.
Returns the Transform that contains the Text.
Returns the position of the component.
Returns the Button instance of the component.
Returns the Text instance of the component.
The text inside of the button.
Note: You can use this for both getting and setting the text
Executed when the button is clicked.
VRCEUiButton button = new VRCEUiButton("btnTest", new Vector2(0f, 0f), "Test Button");
button.OnClick += () {
// Code
};