msciotti / discord-game-sdk-test-apps Goto Github PK
View Code? Open in Web Editor NEWA repo full of various Discord GameSDK sample apps
A repo full of various Discord GameSDK sample apps
In the given example tried adding following code in the main.cpp before UpdateActivity to set the game launch link
state.core->ActivityManager().RegisterCommand("chrome.exe https://google.com"); and
state.core->ActivityManager().RegisterCommand("https://google.com");
Neither of above command worked to reflect the game launch link in the users rich presence. Does the registerCommand support http or https protocol?
Hi,
I'm developing a RichPresence for a game in Unity.
I just saw this amazing example but I'm worried about exposing the CLIENT_ID.
Here:
Is it really safe or I need some kind of environment variable?
I'm getting the following runtime error when running a compiled IL2CPP build using Unity 2018.2.21f1.
NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. at System.Runtime.InteropServices.Marshal.StructureToPtr[T] (T structure, System.IntPtr ptr, System.Boolean fDeleteOld) [0x00000] in <00000000000000000000000000000000>:0 at Discord.ActivityManager..ctor (System.IntPtr ptr, System.IntPtr eventsPtr, Discord.ActivityManager+FFIEvents& events) [0x00000] in <00000000000000000000000000000000>:0 at Discord.Discord.GetActivityManager () [0x00000] in <00000000000000000000000000000000>:0 at DiscordController.Start () [0x00000] in <00000000000000000000000000000000>:0
Under what license is the code of this repository?
Hi, thank you for the sample apps. I was wondering if it would be good to update the Unity example with these comments from the starter guide. Personally I was very surprised that closing your game is the default behavior if discord can't be started, even with a try/catch (tested on ubuntu), so it's good to make this clear to save people some time. I wonder what the use case is for a game requiring Discord to start, but using the other flag is easy enough.
https://discord.com/developers/docs/game-sdk/sdk-starter-guide
/*
Grab that Client ID from earlier
Discord.CreateFlags.Default will require Discord to be running for the game to work
If Discord is not running, it will:
1. Close your game
2. Open Discord
3. Attempt to re-open your game
Step 3 will fail when running directly from the Unity editor
Therefore, always keep Discord running during tests, or use Discord.CreateFlags.NoRequireDiscord
*/
var discord = new Discord.Discord(CLIENT_ID, (UInt64)Discord.CreateFlags.Default);
Thank you
Hi, Thank you very much for this demo as it was the only way for me to get discord SDK!
I have a question about what platforms is this SDK for and is it possible to be used for WebGL. I tried it and it did not work is there something that I can do to make it work?
I get two compiler errors after importing the sdk, they're all within the sdk:
Assets\Plugins\DiscordGameSDK\Core.cs(3492,17): error CS0019: Operator '!=' cannot be applied to operands of type 'bool' and 'Result'
Assets\Plugins\DiscordGameSDK\Core.cs(3494,43): error CS1503: Argument 1: cannot convert from 'bool' to 'Discord.Result'
(System.UInt64)Discord.CreateFlags.Default
If run in editor, editor crash
If build and run game, game crash
(System.UInt64)Discord.CreateFlags.NoRequireDiscord
Game not detected and SDK not effect game.
Operating System: Ubuntu 21.04
Hello,
Using the latest SDK (as of 02 Dec 2019) I'm trying to integrate invite/join function but the game is not detected unless I open it manually.
I've found this issue and I still think that it is not resolved:
discord/discord-rpc#238
Can you please suggest any workarounds/fixes for this?
Do I need to have the game page published (for testers or alpha)?
I have the registry key set and I can launch the game with URL:
discord-:// from the browser, but it takes couple of seconds (which is strange)
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.