Open TobiasMorell opened 6 years ago
I've done some more research and have been able to generate answers for my questions. I will post them here if anyone has similar needs:
uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking")
I currently suspect this is an issue in Unity's build system and I have replied to a forum post about a similar issue and hope for aid there.
I will leave the issue open until I have a definite answer for my first question,
Hi @TobiasMorell Unfortunately we have not been able to get Unity to load a Draco plug-in in the browser as well. I will keep this open as an enhancement. Hopefully in the future we will figure out how to get this to work.
@FrankGalligan thank you for your reply. I haven't had time to check it myself, but I was thinking that it might be possible to use the readymade JavaScript compilation instead. I will examine myself when I have some spare time and post my discoveries here.
If you want to check it out you can find more information about interfacing with browser scripting.
Thanks @TobiasMorell
Hi @FrankGalligan I spent some time this morning trying to add a JavaScript library. I tried to things, none of which were successful:
@tomfinegan Can you help @TobiasMorell out with cmake?
@TobiasMorell:
I'm assuming you already have the emsdk installed, and that an Emscripten build of Draco works for you in its standard form. In other words, this should already work:
$ cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake path/to/draco && make
Assuming the above is working, what happens if you run cmake and build Draco like this?
$ cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/path/to/Emscripten.cmake -DBUILD_UNITY_PLUGIN=1 -DENABLE_JS_GLUE=0 && make
@TobiasMorell
Note, the second step is likely not enough, but would be a starting point. Glue code and IDL are likely needed for DracoToUnityMesh, ReleaseUnityMesh(), and DecodeMeshForUnity(). I can look into hooking this up next week.
Hi @tomfinegan. Thank you for your help.
Both commands ran to completion without any errors. However, it seems that the second command outputs both the libdracodec_unity.so file and the draco_encoder.js and draco_decoder.js. I was not able to find a js-version of the Unity-plugin after the build. Please let me know if there's anything I can do to help.
Hi @tomfinegan. Have you had time to look into this issue?
Only enough time to confirm that Draco needs IDL and wrapper code for the Draco Unity Plugin for this to progress further. I'm going to flip the assignment of this back to @FrankGalligan, at least for now, as I don't have time to investigate this more deeply at present.
Hey guys, any updates about this? would like to contribute to this if any "direction" was given in how to complete this @FrankGalligan @tomfinegan
My forked Unity package is a much improved version and works in WebGL as well: https://gitlab.com/atteneder/DracoUnity It's a shame my PR #540 goes unoticed for months now.
I think I am running into this also, anyone have ideas?
@tomfinegan have you had time to look at @atteneder's PR referenced above?
I'm very interested in the Draco Unity plugin and would like to use it in a project. Before starting I have a couple of questions:
Thank you in advance for your help.