readyplayerme / Unity-Vuplex-Example

19 stars 3 forks source link

Removed the use of the VUPLEX_CCU scripting symbol #15

Closed binarynate closed 1 year ago

binarynate commented 1 year ago

Hi πŸ‘‹πŸ». I'm the founder and developer of Vuplex 3D WebView. The VUPLEX_CCU symbol was an implementation detail of how 3D WebView used Unity's Conditional Compilation Utility library (CCU). For the upcoming 3D WebView v4.4 release, I've updated how 3D WebView uses CCU so that it no longer adds the VUPLEX_CCU symbol and actually removes that symbol from the player settings if it exists. I just realized that this example project uses that VUPLEX_CCU symbol, so I'm submitting this PR to remove usage of it.

I also just realized that my text editor (VS Code) automatically removed some superfluous whitespace that was present in the two files I modified.

srcnalt commented 1 year ago

Hi Nate! Thank you so much for the heads up. The symbol served us two purposes at once, now that one of them is gone I wonder if there will be a symbol that denotes that Vuplex is present in the project. This repo will not work standalone and just throw error messages about scripts not being found. VUPLEX_CCU also made sure that the Vuplex-dependent script didn't run.

binarynate commented 1 year ago

Hi, @srcnalt πŸ‘‹πŸ». You're welcome, and I'm sorryβ€”I wrote a response to you directly after your comment in mid-March, but I just checked this PR and discovered that my response didn't post successfully to GitHub like I had thought : (. Here's a recap of what I wrote in my original response:

β€’ With the removal of VUPLEX_CCU (which I had added by accident), 3D WebView no longer adds a scripting symbol indicating if it's present. However, if you want to, you could use the Unity CCU library to detect if 3D WebView is installed, similar to how 3D WebView uses CCU to detect if some other SDKs are installed. If you want to pursue that route, let me know, and I can provide tips on doing that.

β€’ Although this PR removes usage of the VUPLEX_CCU directive, it doesn't actually change the behavior of the project. Since the VUPLEX_CCU directive is saved in PlayerSettings (which is committed to the repo), #if VUPLEX_CCU always evaluated to true, so removing the usage of the directive results in the same behavior, which is that there's a compiler error if 3D WebView isn't installed. I think a compiler error in that scenario is reasonable, since the project is an example of using ReadyPlayerMe with 3D WebView. For example, all of the 3D WebView example projects (like the Oculus example) are the same way.

Now I have a new update on this issue, which is that I shipped the new v4.4 release (which removes VUPLEX_CCU) last week.

srcnalt commented 1 year ago

thank you for the details Nate, that makes a lot of sense. @HarrisonHough could you test the PR when you have the time and let's update it with the latest Vuplex changes?

HarrisonHough commented 1 year ago

Looks good thanks for doing this!

binarynate commented 1 year ago

You're welcome, @HarrisonHough , and thanks for merging!