FomTarro / VTS-Sharp

C# Library for interacting with the VTube Studio API
https://assetstore.unity.com/packages/tools/integration/vts-sharp-203218
MIT License
36 stars 11 forks source link

The WebSocket Sharp version might mistakenly be an old prerelease version #15

Closed Mysteryem closed 2 years ago

Mysteryem commented 2 years ago

I was trying to develop something using VTS-Sharp and WebSocket Sharp. Initially, I was having problems with WebSocket Sharp classes that couldn't be found and I'd thought that maybe you'd stripped out all the stuff you didn't need from WebSocket Sharp. So I installed WebSocket Sharp myself, from https://www.nuget.org/packages/WebSocketSharp with the NuGet command line since I didn't really want to install and try and figure out MonoDevelop just to build it from source. Unfortunately, the most recent version on NuGet is pretty old anyway, from back in July 2016, but it seemed to have the classes that I thought were missing (version 1.0.3-rc11 appears to be up to and including this commit https://github.com/sta/websocket-sharp/commit/c044fdc4d057fab99c92e8d5809c088476b1225a).

Installing version 1.0.3-rc11 with NuGet and replacing the existing websocket-sharp.dll in my Unity project with that version gave a bunch of errors with the VTS-Sharp code. I noticed in particular that WebSocketSharpImpl.cs was trying to use WebSocketState.CONNECTING, but that was changed to PascalCase in March 2014: https://github.com/sta/websocket-sharp/commit/d632fc839fc378af77af3cb9b77318953acb473f leading me to guess that you're using a prerelease version older than that.

It could be that the newer versions have some issues that I don't know about or that you have other reasons for using the chosen version of WebSocket Sharp, but I thought it was a bit odd so thought it was worth pointing out.

The old version isn't stopping me from developing or anything since I can look back at all the old code on github and so far it's mostly just changed class names that I've been running into, so feel free to close this issue.

FomTarro commented 2 years ago

Guilty as charged; I didn't feel like rebuilding a DLL so I re-used the one I had on hand from an earlier project. I'm interested to know more about: I was having problems with WebSocket Sharp classes that couldn't be found. Classes being referenced in the implementation, or additional classes you were trying to call yourself?

Does this library, as it is in the git right now, compile for you?

Mysteryem commented 2 years ago

I was trying to use classes in my own code that had different names back in older versions of WebSocket Sharp.

This library works great so far (I haven't done much yet, but I'm sure it'll go great). I'm using the current version on the Unity Asset Store without issue now that I roughly know the WebSocket Sharp version.

FomTarro commented 2 years ago

Cool, cool. The Unity Asset Store and the git repo are currently on parity (though that will change soon as I have new API methods to add this weekend). Sorry for cutting corners!

FomTarro commented 2 years ago

Updated as of the Event API addition in version 1.7.0.