Phidgets22: Basic Project Not Working Because of 1 Line

Any hardware type questions or problems for all other Phidget devices.
Post Reply
carybanks
Fresh meat
Posts: 3
Joined: Thu Apr 11, 2024 2:14 am
Contact:

Phidgets22: Basic Project Not Working Because of 1 Line

Post by carybanks »

Hello,
I'm trying to get a basic project running in Unity, and I'm having some trouble just getting the code to run. Apparently, "Phidget.ResetLibrary()" is not a recognizable function in Phidget22 anymore - at least, that's what I'm understanding, because it's the only line of the whole code that comes up as an error. geometry dash scratch

Code: Select all

void OnApplicationQuit()
        {
		if (Application.isEditor)
			Phidget.ResetLibrary();
		else
			Phidget.FinalizeLibrary(0);
	}
I can't just default the command to "Phidget.FinalizeLibrary(0)", because that just crashes my Unity Editor. Any suggestions to solve this issue?
Last edited by carybanks on Fri Apr 12, 2024 2:56 am, edited 1 time in total.
LucasP
Phidgetly
Posts: 22
Joined: Fri Oct 07, 2016 4:47 pm
Contact:

Re: Phidgets22: Basic Project Not Working Because of 1 Line

Post by LucasP »

There are some basic projects on this page that show how to get started with Unity.
User avatar
Patrick
Lead Developer
Posts: 618
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Phidgets22: Basic Project Not Working Because of 1 Line

Post by Patrick »

Make sure that you're using an up to date copy of the Phidget libraries. ResetLibrary() was added in version 1.0.0.20190304 and has been in the library ever since.

-Patrick
carybanks
Fresh meat
Posts: 3
Joined: Thu Apr 11, 2024 2:14 am
Contact:

Re: Phidgets22: Basic Project Not Working Because of 1 Line

Post by carybanks »

I got it. Thanks for your answer
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests