Comments (9)
I updated Steamworks.NET in the Unity Package Manager window and can now successfully call the API. Thanks for getting this fixed so quickly!
from steamworks.net.
Not sure if we can put PR for this, seem the repo almost out of life.
Add this in CodeGen/src/interfaces.py
:
g_TypeDict = {
...
"const int *": "ref int",
"const uint16 *": "ref ushort",
...
}
from steamworks.net.
Thanks for the tip. ref int
and ref ushort
would only allow passing 1 int and 1 ushort, which also doesn't match the native method signature. Is it valid to specify int[]
and ushort[]
? I've seen some other methods that have parameters with the byte[]
signature
from steamworks.net.
oh right sorry, didn't see the header file completely, yeah then that works
from steamworks.net.
Can you verify that int[] and ushort[] work?
If so we can get that change in this weekend. I think the spot to make a change is in g_SpecialArgsDict
from steamworks.net.
I'll give it a try and see if I can put a PR together; might not happen until the work week
from steamworks.net.
I don't need a full PR, I can do that pretty quickly, what I can't really do right now is verify that it works.
To test locally without having to regenerate everything you'd need to make two manual changes to both:
Ultimately they should probably end up looking like say this: https://github.com/search?q=repo%3Arlabrecque%2FSteamworks.NET%20pvecDepots&type=code
from steamworks.net.
Thanks Riley
I made a mutable local copy of the Unity package and compiled successfully with the edits shown below. The method call succeeds at runtime and received k_EResultOK using this invocation:
Invocation:
var lanesResult = SteamNetworkingSockets.ConfigureConnectionLanes(conn, 3, new int[] {1, 2, 3}, new ushort[] {4, 5, 6});
Package edits:
[DllImport(NativeLibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConfigureConnectionLanes", CallingConvention = CallingConvention.Cdecl)]
public static extern EResult ISteamNetworkingSockets_ConfigureConnectionLanes(IntPtr instancePtr, HSteamNetConnection hConn, int nNumLanes, [In, Out] int[] pLanePriorities, [In, Out] ushort[] pLaneWeights);
public static EResult ConfigureConnectionLanes(HSteamNetConnection hConn, int nNumLanes, int[] pLanePriorities, ushort[] pLaneWeights) {
InteropHelp.TestIfAvailableClient();
return NativeMethods.ISteamNetworkingSockets_ConfigureConnectionLanes(CSteamAPIContext.GetSteamNetworkingSockets(), hConn, nNumLanes, pLanePriorities, pLaneWeights);
}
public static EResult ConfigureConnectionLanes(HSteamNetConnection hConn, int nNumLanes, int[] pLanePriorities, ushort[] pLaneWeights) {
InteropHelp.TestIfAvailableGameServer();
return NativeMethods.ISteamNetworkingSockets_ConfigureConnectionLanes(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn, nNumLanes, pLanePriorities, pLaneWeights);
}
from steamworks.net.
Thanks @Idles ! Whenever you get a chance can you make sure that new commit fixes this accurately?
from steamworks.net.
Related Issues (20)
- [Leaderboards] SteamUserStats.GetDownloadedLeaderboardEntry() Errors HOT 3
- SteamNetworkingSockets.SendMessages has incorrect parameter types; can't be called successfully HOT 5
- SteamUGC.CreateItem returns k_EResultAccessDenied. Logs show wrong AppId? HOT 3
- SteamNetworkingMessage_t isn't an unmanaged type, blocking optimized API calls HOT 1
- Init fails on Steamworks SDK 1.59 with `Unable to find an entry point named 'SteamAPI_Init'` HOT 4
- Latest SteamWorks.NET Run SteamApi.Init() failed on Debian-x64
- HTMLSurface attempting to render invalid data HOT 3
- LobbyEnter_t.m_EChatRoomEnterResponse of type uint instead of an enum? HOT 1
- libsdkencryptedappticket cannot be loaded on Linux
- SteamUserStats.UploadLeaderboardScore pScoreDetails does not work
- Error CS0246 when compiling on non PC build
- Adding Multiplayer to game HOT 2
- can this be used in a WinUI project? HOT 3
- Error 4003 - CA key is not known to us HOT 2
- Callback number not found for struct Steamworks.SteamInventoryResult_t HOT 1
- SteamEncryptedAppTicket.BDecryptTicket does not correctly decrypt app ticket in Spacewar HOT 1
- SteamAPI_Init function doesn't exist in the steam_api64.dll from their sdk HOT 1
- Update to Steamworks SDK 1.60 HOT 3
- Create new release HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steamworks.net.