Skip to content

eslam980/Ultimate-Discord-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ultimate Discord SDK

This is A Discord SDK for Unity image

Features

  • Easy To Use.
  • Join/Request System,
  • Full Unity Integration
  • Modular Code (Easy To Understand)
  • Safe Mode.
  • Custom Inspector.
  • PUN 2 / Mirror Integration.

Discord-Levlinvite.png

Usage

  • Ultimate Discord uses Dll/Offical Discord C# SDK
  • Create C# Script or Use The Template
  • Use NameSpace UDiscord to Access The Code

How To Get Started

  • Put Plugins File into to your Unity Project.
  • Make Script or Use The Template.
  • Use Using UDiscord to Access All The Fuctions

Examples

  • Button : Add Button Into The Scene And Make A Script
  • Add Discord Manager into The Scene , Assign AppID
  • Code Example :
using UnityEngine;
using UDiscord; // Use This To Get Discord Manager

public class ExampleButton : MonoBehaviour
{
    public void OnClick()
    {
        // Calling DiscordManager.App.UpdateRich : To Update Dicsord Rich But Will Change detail , state Only 
        // Only Things That you put it in UpdateRich , Will Change , Others will stay the Same.
        
        DiscordManager.App.UpdateRich(detail : "Playing Solo" , state : "Private Lobby");
    }
}

Discord-Image.png

  • Other Example Is A OnTriggerEnter() To Change Rich will entering Another Area
  • Code Example :
using UnityEngine;
using UDiscord; // Use This To Get Discord Manager

public class ExampleTrigger : MonoBehaviour
{
    void OnTriggerEnter(Collider other)
    {
        //When AnyThing enter Area
        DiscordManager.App.UpdateRich(detail : "Playing Solo" , state : "Desert");

        //other Way
        if(other.gameObject.CompareTag("Player"))
        {
            DiscordManager.App.UpdateRich(detail : "Playing Solo" , state : "Sky");
        }
    }
}

Discord Manager

This is The Manager that handle all the Work to Connect with discord

Discord_Start

This Boolan to make the Template Work on Start here is the code Code for it OnConnect.AddListener(CallDiscord); OnConnect?.Invoke();

About

This is A Discord SDK for Unity

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages