Software Archive
Read-only legacy content
17061 Discussions

RealSense and the Unity Web Player - a discussion

MartyG
Honored Contributor III
588 Views

Hi everyone,

I wanted to start a conversation about how RealSense's camera DLLs apparently do not function in projects exported from Unity as online Unity Web Player builds.  Apparently, the player (and maybe browsers in general) forbids C++ based DLL files to be used because they represent a security risk that would allow hackers to insert malware into programs.

It has been suggested by internet folk commenting on this issue that browsers do however allow DLL files that have been compiled as "Managed Plugins" that are based around 'NET format code.  These are more limited in their operation than regular DLLs though, as they cannot access as many functions on the computer.  So it's possible that the camera would not be able to function if its DLLs were in this more limited form.

This section of the Unity documentation about Managed Plugins is very informative.

http://docs.unity3d.com/Manual/UsingDLL.html

What do the rest of you think? 

0 Kudos
2 Replies
RRanj2
Beginner
588 Views

Previously when first using RealSense I also never tried in ekspors to Web Player, I just use as a reference docs.unity.com tutorial, but can not walk well because of the limited DLL file also

0 Kudos
MartyG
Honored Contributor III
588 Views

There is also an Intel PDF guide with a section on page 4 about exporting for Unity Web Player by using a special web version of the libpxcclr DLL plugin instead of the usual one.  

https://software.intel.com/sites/default/files/Browser_Support.pdf

When I tried it though and eventually got it to run (it hated having the regular and web versions of libpxcclr in the same Unity plugins folder), nothing happened.  One would think that the guide writer must have got it to work or they would not have put the info in the guide.  But at the same time, there seems to be this issue with C++ plugins being blocked by browsers.  So I don't know.  I'll keep trying to get it to work!

Edit: a link on page 3 of the guide provides more detailed insight about what will and won't work

https://software.intel.com/sites/landingpage/realsense/camera-sdk/v1.1/documentation/html/index.html?manuals_unity_web_player.html.

Edit 2: the guide also made mention of a Unity Web Player HTMLversion of the CubeSense sample.  I uploaded it to my website to try it.  It did not load in Chrome or Windows 10's new Project Spartan / Edge browser, and it ran in Firefox and Internet Explorer but the camera was lifeless.

The web sample is in the Framework > Unity > FF_CubeSense > HTML folder.

 

 

 

 

0 Kudos
Reply