librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

References to UnityEditor in Scripts folder prevents build.

Open blairlc opened this issue 8 years ago • 7 comments

Required Info
Camera Model R415
Firmware Version 05.08.15.00
Operating System & Version Win 10
Platform Unity 2017.3
SDK Version 2.10.2

Issue Description

When building the Unity example, several errors appear including:

Assets/RealSenseSDK2.0/Scripts/RealSenseDeviceInspector.cs(4,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing an assembly reference?

The error above is caused by referencing UnityEditor outside the Editor folder.

blairlc avatar Apr 02 '18 16:04 blairlc

This error can be fixed by moving the RealSenseDeviceInspectorEditor class to a separate script which is placed in a folder named Editor.

blairlc avatar Apr 02 '18 17:04 blairlc

[Realsense Customer Engineering Team Comment] hi @blairlc,

would like to confirm that you are good with this issue just want to modify the script as you mentioned?

No. Separating the scripts as I described makes the error go away. However, after reading more documentation I realized that there is supposed to be an editor dropdown for the RealSenseDevice. It is still not there. This is a workaround if you don't need the editor, but it doesn't fix the problem.

blairlc avatar Apr 23 '18 17:04 blairlc

[Realsense Customer Engineering Team Comment] Hi @blairlc,

This is as a feature improvement and we will discuss internally. If any update, will let you know.

[Realsense Customer Engineering Team Comment] Hi @blairlc,

Please try the latest librealsense, add the script "RealSenseDeviceInspector.cs" as a component to "RealsenseDevice" game object, then you can have the device stream settings in Inspector windows during streaming.

[Realsense Customer Engineering Team Comment] Hi @blairlc,

Still need any support for this topic?

[Realsense Customer Engineering Team Comment] Hi @blairlc,

The issue will be closed. If any further question, still can re-open or create another ticket.