14 Commits

Author SHA1 Message Date
Louis
c79858e169 Merge pull request #18 from TurboSonic1/Unreal-Engine-5.2
Built Plugin for Unreal Engine 5.2
2023-09-23 00:13:08 +02:00
TurboSonic1
46b32a3e48 Delete Config directory 2023-08-03 21:40:48 -04:00
TurboSonic1
846c253868 Add files via upload 2023-08-03 21:24:56 -04:00
TurboSonic1
dafdd5977b Delete DiscordRpc.uplugin 2023-08-03 21:24:42 -04:00
Louis
79564c8f12 Merge pull request #10 from IT-Hock/Unreal-Engine-5.1
chore: add unreal engine gitignore
2023-06-09 21:11:32 +02:00
Dominic Hock
9c0435cb71 chore: add unreal engine gitignore
Signed-off-by: Dominic Hock <d.hock@it-hock.de>
2023-05-07 15:30:44 +02:00
Louis
f4a009ceb4 Update DiscordRpc.uplugin 2022-10-09 19:56:43 +02:00
Louis
419f2eb786 Update DiscordRpcBlueprint.h 2022-10-09 15:59:56 +02:00
Louis
9feb8b49df Update DiscordRpc.uplugin 2022-10-09 14:27:51 +02:00
Louis
e3965228a6 Update README.md 2022-09-26 11:55:22 +02:00
Louis
a8e405111d Update README.md 2022-09-24 20:48:15 +02:00
Louis
9f55233275 Update README.md 2022-09-24 20:37:19 +02:00
Louis
a17b65824b Merge pull request #1 from LouisRaverdy/add-license
Create LICENSE
2022-09-19 18:18:08 +02:00
Louis
7e302aa747 Create LICENSE 2022-09-19 18:17:44 +02:00
6 changed files with 677 additions and 58 deletions

602
.gitignore vendored Normal file
View File

@@ -0,0 +1,602 @@
# Created by https://www.toptal.com/developers/gitignore/api/rider,visualstudio,visualstudiocode,c++,unrealengine
# Edit at https://www.toptal.com/developers/gitignore?templates=rider,visualstudio,visualstudiocode,c++,unrealengine
### C++ ###
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### UnrealEngine ###
# Visual Studio 2015 user specific files
.vs/
# Compiled Object files
# Precompiled Headers
# Compiled Dynamic libraries
# Fortran module files
# Compiled Static libraries
# Executables
*.ipa
# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga
# Binary Files
Binaries/*
Plugins/*/Binaries/*
# Builds
Build/*
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt
# Don't ignore icon files in Build
!Build/**/*.ico
# Built data for maps
*_BuiltData.uasset
# Configuration files generated by the Editor
Saved/*
# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*
# Cache files for the editor to use
DerivedDataCache/*
### UnrealEngine Patch ###
# Don't ignore icon and splash images for mobile app
!Build/IOS/Resources/
Build/IOS/Resources/*
!Build/IOS/Resources/Graphics/
Build/IOS/Resources/Graphics/*
!Build/IOS/Resources/Graphics/*.png
!Build/Android/res/
Build/Android/res/*
!Build/Android/res/*/
Build/Android/res/*/*
!Build/Android/res/*/*.png
# Ignore plugins binaries on deep subfolders
Plugins/**/Binaries/*
Plugins/**/Intermediate/*
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.iobj
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.cachefile
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
*.code-workspace
# Local History for Visual Studio Code
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
### VisualStudio Patch ###
# Additional files built by Visual Studio
# End of https://www.toptal.com/developers/gitignore/api/rider,visualstudio,visualstudiocode,c++,unrealengine
__ExternalActors__/
__ExternalObjects__/

View File

@@ -1,8 +0,0 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll

View File

@@ -1,29 +1,27 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.1",
"FriendlyName": "Discord RPC",
"Description": "Wrap the Discord RPC library.",
"Category": "Messaging",
"CreatedBy": "Chris Marsh <chris@discordapp.com> and updated by Louis R.",
"CreatedByURL": "https://discordapp.com/",
"DocsURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"MarketplaceURL": "",
"SupportURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"CanContainContent": true,
"IsBetaVersion": true,
"Installed": false,
"Modules": [
{
"Name": "DiscordRpc",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"WhitelistPlatforms" :
[
"Win64",
"Linux",
"Mac"
]
}
]
}
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.1",
"FriendlyName": "Discord RPC",
"Description": "Wrap the Discord RPC library.",
"Category": "Messaging",
"CreatedBy": "Chris Marsh & Louis Raverdy",
"CreatedByURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"DocsURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"MarketplaceURL": "",
"SupportURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"EngineVersion": "5.2.0",
"CanContainContent": true,
"Installed": true,
"Modules": [
{
"Name": "DiscordRpc",
"Type": "Runtime",
"LoadingPhase": "PreDefault",
"PlatformAllowList": [
"Win64",
"Mac"
]
}
]
}

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Louis Raverdy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -21,12 +21,18 @@ You need to create something like this in your **Game Instance** :
![InitDiscord](https://user-images.githubusercontent.com/47295080/147773538-c4ac76cd-2199-4a1a-af90-cc695d8c0386.png)
> **Note :** Make sure your Game Instance is defined as default in the Project Settings. (Project Settings -> Maps & Modes -> Game Instance Class)
For remove your presence when you exit the game you need to add this to your **Game Instance** :
![shutdown](https://user-images.githubusercontent.com/47295080/192113957-b7675e3f-161d-4d23-bb98-e5ce6f48a586.png)
## Nodes
For edit your presence in your game use this code (read the image next to it to understand the fields of the node) :
To update your presence for your game, you can use this code (read the image next to it to understand the fields of the node) :
![SetPresenceDiscord](https://user-images.githubusercontent.com/47295080/147773549-6f106fda-835d-4cff-97f8-c220627b2dbf.png)
> **Note :** For use image in rich presence you need to upload them on your Discord developer game page (Rich Presence -> Art Assets)
> **Note :** To use image in rich presence you need to upload them on your Discord developer game page (Rich Presence -> Art Assets)
### **More advanced documentation coming soon.**

View File

@@ -14,13 +14,13 @@ USTRUCT(BlueprintType)
struct FDiscordUserData {
GENERATED_USTRUCT_BODY()
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString userId;
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString username;
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString discriminator;
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString avatar;
};
@@ -53,36 +53,36 @@ USTRUCT(BlueprintType)
struct FDiscordRichPresence {
GENERATED_USTRUCT_BODY()
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString state;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString details;
// todo, timestamps are 64bit, does that even matter?
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int startTimestamp = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int endTimestamp = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString largeImageKey;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString largeImageText;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString smallImageKey;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString smallImageText;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString partyId;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int partySize = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int partyMax = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString matchSecret;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString joinSecret;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString spectateSecret;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
bool instance = false;
};