Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't receive data with latest version #27

Open
FlowingSPDG opened this issue Mar 2, 2019 · 10 comments
Open

can't receive data with latest version #27

FlowingSPDG opened this issue Mar 2, 2019 · 10 comments

Comments

@FlowingSPDG
Copy link

FlowingSPDG commented Mar 2, 2019

hi,thanks for developing nice lib :)
I'm developing new HUD system with CSGSI and Unity,but I can't receive data with latest one.
It works with release "release" version(https://github.com/rakijah/CSGSI/releases/tag/v1.1.1 ),but it won't work with latest commit version.
I think I have some trouble in my dll,could u please help me?
thanks.

my project : https://github.com/FlowingSPDG/CS-GO-Observer-Unity-HUD

@rakijah
Copy link
Owner

rakijah commented Mar 3, 2019

Hello,

looking at your GSI_Receiver.cs, I see you're using the string constructor for GameStateListener here.
Can you try initializing it via gsl = new GameStateListener(3001); instead? (I know this seems ridiculous, but CSGSI uses C#'s HttpListener for networking which has some bizarre behavior sometimes...)

@FlowingSPDG
Copy link
Author

thx for reply :)
I tried it,but it can't receive GSI data from CS:GO(even both of v1.1.1 and latest).

@YorVeX
Copy link

YorVeX commented Mar 3, 2019

Since you're using localhost anyway: Did you try using the constructor that only takes the port as parameter? That's what I am using (in several different tools with different ports) and it's working fine for me.

If that still doesn't work check if your firewall prevents your program from accepting connections on that port, some firewalls do that even for localhost bound interfaces.

@rakijah
Copy link
Owner

rakijah commented Mar 3, 2019

I downloaded your project and set up the cfg (did not change the code at all). Watched a demo and it seems to be working for me: screenshot. Sounds like it might be some network configuration problem on your end.

@FlowingSPDG
Copy link
Author

@YorVeX I've turned off Firewalls and still not working. I can access http://localhost:3001/ by using browser tho.
@rakijah have you replaced latest dll binary in Assets/Plugins/CSGSI.dll ?
that dll in my repo is v1.1.1 . so it should work.

@rakijah
Copy link
Owner

rakijah commented Mar 3, 2019

Yeah, my bad. If I replace the dll it doesn't work in Unity.

But when I set up a minimal console application project, it works without issues. I've gone through the changes made in the last few commits and can't seem to figure out why it would work in regular .NET projects but not in Unity. I've also tried compiling CSGSI for .NET 3.5 but no success.

One thing that may be an issue: In your gamestate_integration_unitytest.cfg you set the uri to 127.0.0.1. I've had issues in the past where I had to swap "127.0.0.1" for "localhost" to make it work, but again, this didn't work in this case.

@rakijah
Copy link
Owner

rakijah commented Mar 3, 2019

Oh wait, I got it to work by recompiling CSGSI after changing the target framework to .NET 3.5 and setting Unity's scripting runtime version to framework 3.5 as well. Seems to be a compatibility issue between .NET 4.x and Unity's .NET backend (Mono).

@FlowingSPDG
Copy link
Author

hmm its big problem for me,I tried to change version to .NET 3.5,but other library only supports 4.x .
v1.1.1 was working with .NET4.x, so I think some codes depends .NET 3.5 .
I know fixing it takes a lot of your time, you can leave this issue away.

btw Im trying to update it cuz v1.1.1 doesnt support CoutdownPhase.

@rakijah
Copy link
Owner

rakijah commented Mar 3, 2019

You can get CSGSI to compile if you switch the project to 3.5, then uninstall and reinstall JSON.Net.
Sorry, but I can't figure out what's causing this issue...

@FlowingSPDG
Copy link
Author

hmm okay... I'll try reinstalling it.
okay,I guess there's code which doesnt support .net 4.x after v1.1.1. I'll try to find it when I have time.
Thanks for helping me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants