thefranke / unityx3d

A script to import/export X3D to/from Unity
26 stars 10 forks source link

Some minor changes to allow incorporation of X3D loading in stand-alone builds #4

Closed JohnGrime closed 5 years ago

JohnGrime commented 5 years ago

Hi Tobias,

I noticed I couldn't incorporate the X3D import/export classes into a stand-alone build of a Unity project, as some code assumes it's running in the Unity editor.

I've tried to add a few simple preprocessor checks to sidestep this issue; can you take a look and let me know what you think?

I tested the new code out with one of my sample X3D files, and it seems to load the file correctly when running in both the Unity editor and as a stand-alone build. I'm not sure how/if we should retain equivalent functionality for saving X3D files in stand-alone builds vs the editor, as that functionality currently assumes some editor-dependent selection information etc.

Cheers!