Пример #1
0
    void Start()
    {
        IRichPresence rp = RichPresenceComponent.Instance.RichPresenceModule; // for ez access

        rp.SetPrimaryText("In-game");
        rp.SetPrimaryImage("main_icon");
        rp.SetPrimaryImageTooltip("look at this epic house");
    }
Пример #2
0
    // RP

    public void SetRichPresence(string primaryText, string primaryImage, string primaryImageTooltip)
    {
        if (RichPresenceComponent.Instance != null)
        {
            IRichPresence irp = RichPresenceComponent.Instance.RichPresenceModule;
            irp.SetPrimaryText(primaryText);
            irp.SetPrimaryImage(primaryImage);
            irp.SetPrimaryImageTooltip(primaryImageTooltip);

            irp.SetTimestamps((int)DateTimeOffset.Now.ToUnixTimeSeconds(), 0);
        }
    }