Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vr_autoload requirement prevents plugin from working out of the box #47

Open
goatchurchprime opened this issue Dec 17, 2020 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@goatchurchprime
Copy link
Contributor

When you install from the asset library and try to run any example scene you get a "Parser Error: Expected a constant expression." on a line such as:

export(vr.CONTROLLER_BUTTON) var grab_button = vr.CONTROLLER_BUTTON.GRIP_TRIGGER;

I remember from last time it took quite a while to find out you had to add the singleton vr_autoload.gd as vr into the project. This problem was made worse because I was new and didn't know what autoloading was.

Is there a way to either: (1) make sure this startup error is useful in telling you to add this autoloading thing in, (2) put this requirement in bold in the description of the plugin, or (3) programmatically load the singleton at the start of each demo so this is doesn't need to be done?

Also, there's a typo on line 20 of OQ_UI2DLabel.gd.

onready var ui_color_rect : CenterContainer = $Viewport/ColorRect

should be

onready var ui_color_rect : ColorRect = $Viewport/ColorRect

@goatchurchprime
Copy link
Contributor Author

Closely related issue is that you can't play any of the individual scenes when you have downloaded the asset until you insert the line:

vr.initialize()

into the _ready() function of the top node of the scene. Perhaps the lines:

if vr.is_initialized:
    vr.initialize()

at the beginning of each of these scenes would help people see what's supposed to happen.

@NeoSpark314
Copy link
Owner

Thanks for raising this point. You are right that using the toolkit from the asset repository is not as easy as it should be. I like the idea of adding a check in all the demo scenes that will print out a warning when the vr autoload does not exist and also call the initialize to work directly. I think we could also include a link to the wiki here on github (but it might need some more extension).

Regarding the type error: this is fixed on master but the asset has not yet been updated with a newer version of the toolkit.

@NeoSpark314 NeoSpark314 added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 17, 2020
@NeoSpark314 NeoSpark314 self-assigned this Dec 17, 2020
@goatchurchprime
Copy link
Contributor Author

Did you fix this one already?

@pwab
Copy link

pwab commented May 26, 2021

Did you fix this one already?

I can confirm that it's not. I wanted to test hand tracking right now and had to do both steps:

  • add the singleton vr_autoload.gd as vr to the project
  • add vr.initialize() to the _ready() function of the scene

So thanks for this issue and your comments @goatchurchprime 😅


But it's already documented in the Wiki. So it's mostly an issue about guiding the user of the toolkit with the right error message texts to do the right steps or simply rtfm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants