docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Delegate SteamAPIWarningMessageHook_t

    Receives Steam API warnings and diagnostic messages. Install it with SetWarningMessageHook(SteamAPIWarningMessageHook_t).

    Steam calls it from native code, so the method that implements it must be static and carry [AOT.MonoPInvokeCallback(typeof(SteamAPIWarningMessageHook_t))]. IL2CPP builds a native entry point only for such a method; any other method fails at runtime, not at build time. The handler must catch every exception, because one unwinding into Steam's stack is undefined behavior.

    Namespace: Unity.Steamworks.Interop
    Assembly: Unity.Steamworks.Interop.dll
    Syntax
    public delegate void SteamAPIWarningMessageHook_t(int nSeverity, IntPtr pchDebugText)
    Parameters
    Type Name Description
    int nSeverity

    0 for an informational message, 1 for a warning.

    IntPtr pchDebugText

    The null-terminated UTF-8 message text; read it with PtrToStringUTF8(IntPtr).

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)