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

SocketIOResponse could not be found #76

Open
frostfire1 opened this issue Nov 26, 2023 · 2 comments
Open

SocketIOResponse could not be found #76

frostfire1 opened this issue Nov 26, 2023 · 2 comments

Comments

@frostfire1
Copy link

I try to get json response using SocketIOResponse but unity can't find it

error CS0246: The type or namespace name 'SocketIOResponse' could not be found (are you missing a using directive or an assembly reference?)
socket.On("updatePlayerMovement", (SocketIOResponse response) => { UpdateOtherPlayerMovement(response); });

@itisnajim
Copy link
Owner

omit the type for now, and for UpdateOtherPlayerMovement args use directly the values needed instead of the whole response, e.g:

socket.On("updatePlayerMovement", (response) =>
{
    var playerPosition = response.GetValue<PlayerPosition>();
    UpdateOtherPlayerMovement(playerPosition)
});

@frostfire1
Copy link
Author

okay its work

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

2 participants