Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Unity Tip: Running A RealSense Project With Traditional Controls Without An Attached Camera

MartyG
Honored Contributor III
390 Views

Hi everyone,

It is possible that some developers may be developing "dual control" projects that support traditional controls (mouse / keyboard / joypad etc) as well as the RealSense camera. Reasons for doing so would include providing a familiar interface for users to fall back on or to maximize sales potential of your product on platforms such as Steam for those who do not own a RealSense camera.

If you try to run the project without the camera attached though, you are likely to get the red error message "Unable to initialize all modalities".  You can bypass the camera check and enable your project to run with traditional controls by using the following method:

STEP ONE

Open the SDK script 'SenseToolkitManager' in the Unity script editor.  The fastest way to find it is to type the name into the search box of the Unity Assets panel.

STEP TWO 

Delete lines 343 to 346 and save the script.  Doing so removes the code that produces the red error if it checks for the camera and finds that it is not present.  The amended script basically says "If the camera is missing, do nothing".

1.jpg

So it should now look like this:

2.jpg

Your project should now be able to run with traditional controls without the camera being plugged in.

0 Kudos
0 Replies
Reply