Comments (3)
Yeah, I would first recommend updating to the latest master branch version of Steamworks.NET where string has already been changed to IntPtr.
Valve really should have made it uint8 *
or something like that instead of const char *
.
In my testing I've been doing the following, and it will likely be the recommended way of doing so. Not exactly pretty but given it's low density and low use it should be fine.
void OnHTML_NeedsPaint(HTML_NeedsPaint_t pCallback) {
Debug.Log("[" + HTML_NeedsPaint_t.k_iCallback + " - HTML_NeedsPaint] - " + pCallback.unBrowserHandle + " -- " + pCallback.pBGRA + " -- " + pCallback.unWide + " -- " + pCallback.unTall + " -- " + pCallback.unUpdateX + " -- " + pCallback.unUpdateY + " -- " + pCallback.unUpdateWide + " -- " + pCallback.unUpdateTall + " -- " + pCallback.unScrollX + " -- " + pCallback.unScrollY + " -- " + pCallback.flPageScale + " -- " + pCallback.unPageSerial);
if (m_Texture == null) {
m_Texture = new Texture2D((int)pCallback.unWide, (int)pCallback.unTall, TextureFormat.BGRA32, false, true);
}
int dataSize = (int)(pCallback.unWide * pCallback.unTall * 4);
byte[] bytes = new byte[dataSize];
System.Runtime.InteropServices.Marshal.Copy(pCallback.pBGRA, bytes, 0, dataSize);
m_Texture.LoadRawTextureData(bytes);
m_Texture.Apply();
}
from steamworks.net.
Thanks!
from steamworks.net.
I'll also note since you seem to be the first person actually using this stuff from Steamworks.NET... I'm not sure if TextureFormat.BGRA32 is hooked up correctly on PC platforms. It seems to be greyscale. (but otherwise correct looking)
Needs some more testing, maybe a smaller test case and a ping to Aras from Unity.
from steamworks.net.
Related Issues (20)
- 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 14
- Achievements granted only after closing the game. HOT 2
- windows command prompt flickering on unity editor HOT 7
- ReceiveMessagesOnPollGroup returns proper count of messages with empty pointers array HOT 4
- Building a Unity game on Mac failing consistently. HOT 1
- SteamInternal_GameServer_Init_V2 requires valid pszInternalCheckInterfaceVersions as of version 1.58 HOT 3
- [IL2CPP] Error ISteamMatchmakingServerListResponse
- Cant get SetStat() to work :( HOT 1
- GetResultItemProperty usage unclear
- GetFriendPersonaName returns [unknown] HOT 3
- Steam Timeline event parameters needed in wrong order HOT 11
- SteamInputActionEvent_t incorrectly interprets data in struct HOT 1
- Unable to add Package when trying to upgrade package in Unity HOT 3
- The name 'SteamManager' does not exist in the current context HOT 1
- SteamAPI_InitFlat HOT 2
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.