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

provide access to the SDL in rhai scripts #1735

Closed
garypen opened this issue Sep 9, 2022 · 0 comments · Fixed by #1737
Closed

provide access to the SDL in rhai scripts #1735

garypen opened this issue Sep 9, 2022 · 0 comments · Fixed by #1737
Assignees

Comments

@garypen
Copy link
Contributor

garypen commented Sep 9, 2022

In PR: #1446 we added support for providing the SDL to plugins.

This capability has not been exposed to rhai plugins.

Since the SDL is read-only, the best way to provide this is as a global constant: perhaps apollo_sdl?

@garypen garypen added this to the v1.0.0-alpha.4 milestone Sep 9, 2022
@garypen garypen self-assigned this Sep 9, 2022
garypen added a commit that referenced this issue Sep 12, 2022
also:
- fix a long standing problem with scope which means global variables
now work properly in our rhai scripts.
- add support for downcasting DynPlugin in test which makes testing a
little simpler (I know, we don't like downcasting, but it's helpful in
some kinds of testing)

fixes: #1735
@abernix abernix modified the milestones: v1.0.0-alpha.4, v1.0.0-rc.0 Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants