Lua
C++
Edit

GetUserName

This function retrieves the display name for the specified user ID.

Syntax

Parameter Description
userid user ID to return the name of

Returns

Returns the user's display name.

Example

#include "UltraEngine.h"
#include "Steamworks/Steamworks.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    // Initialize Steam
    if (not Steamworks::Initialize())
    {
        RuntimeError("Steamworks failed to initialize.");
        return 1;
    }

    Print("App ID: " + String(Steamworks::GetAppId()));
    auto id = Steamworks::GetUserId();
    Print("User ID: " + String(id));
    Print("User name: " + Steamworks::GetUserName(id));

    Steamworks::Shutdown();
    return 0;
}
Copyright © 2006-2025 Ultra Software.
All rights reserved.
Leadwerks 4 Documentation