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

how can i use another script and compatible with video lab? #22

Open
kanszerland opened this issue Mar 15, 2019 · 5 comments
Open

how can i use another script and compatible with video lab? #22

kanszerland opened this issue Mar 15, 2019 · 5 comments

Comments

@kanszerland
Copy link

I tried to make another script in video lap unity project,Function of my script it work when it play on ios outside opz app, but doesn't work when i put in opz app.

@cemillerena
Copy link

You can't load other scripts to videolab, at least for now.

@georgechond94
Copy link

That's a Unity Asset Bundle limitation, scripts are not included in Asset Bundles at all. There is a way to dynamically load assemblies/scripts (https://docs.unity3d.com/550/Documentation/Manual/scriptsinassetbundles.html), but even that:

  1. TE has to implement a way in the current OP-Z app to load such assemblies (and give us the possibility to provide them somehow).
  2. Even then, it will not work on iOS, as it's not allowed by Apple to load assemblies on runtime which are not part of the published appstore app.

We are out of luck there.

@sdhuys
Copy link
Contributor

sdhuys commented May 13, 2020

@georgechond94 Thanks for this explanation, but I’m new to all this stuff and it’s a bit confusing to me. If scripts are not included in Asset Bundles at all, then how come the scripts included in videolab work on the op z app? I guess they are part of the app itself?

And the wiki says this: “Content exported for OP-Z can rely only on scripts included in videolab. If you want to add functionality to videolab feel free to fork the repo (see Contributing to videolab).”

To me this sounds like we can add our own scripts to videolab and get it to work on the op z if we fork the repo. Or would TE have to add the extra functionality of one’s fork to their app for it to work?

@georgechond94
Copy link

georgechond94 commented May 13, 2020

Then how come the scripts included in videolab work on the op z app? I guess they are part of the app itself?

Exactly, the videolab "folder" (which contains the scripts) is already part of the op-z app itself. That's why we can use these scripts freely. Our own scripts are not part of the op-z app itself, and Asset Bundles don't include them, so in the exported videopak/asset bundle, our scripts do nothing.

Or would TE have to add the extra functionality of one’s fork to their app for it to work?

Yep, that's exactly what they mean, one has to add functionality to the videlab itself, TE has to include that into the op-z app and then we will be able to use that additional script.

I know it's a bummer, if writing our own scripts was supported, the possibilities would be endless.

@antiero
Copy link

antiero commented Oct 19, 2021

This would be SO good to have.. Imagine being able to pull live data from a website and have it displayed live, or use the iOS/Android device's microphone input to drive some aspect of the videopak.

For now, the only workaround I have is building the Unity Application as an iOS app, and loading on to the device (which works!), but I'd rather have the app as a .zpak that can be shared easily with the OP-Z App!

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

No branches or pull requests

5 participants