Page 1 of 1

When Unity3d Editor is executed, phidget open error is issued.

Posted: Thu Jan 05, 2023 8:27 pm
by dudrock
I am trying to use phidget 1046_0B (Bridge 4-input) in Unity.

However, an open error occurs in the phidget control panel even when the Unity editor is open without running in the Unity editor.

Of course, even if you run Unity, an open error is issued saying that Unity is using it.

Re: When Unity3d Editor is executed, phidget open error is issued.

Posted: Fri Jan 06, 2023 11:21 am
by Patrick
Unity will keep the Phidget library loaded in the editor after the first run, so you need to make sure things get closed and the library gets cleaned up before exiting your program.

Have a look at the last code block here:
https://www.phidgets.com/?view=articles ... sWithUnity

-Patrick

Re: When Unity3d Editor is executed, phidget open error is issued.

Posted: Tue Jan 17, 2023 2:30 am
by dudrock
The code below is already written when the application is closed.
The important thing is that the phidget control panel does not work even if the unity editor is open, not the phidget project.

------------------------------------------------------
void OnApplicationQuit()
{
if (Application.isEditor)
Phidget.ResetLibrary();
else
Phidget.FinalizeLibrary(0);
}