Skip to content

Facepunch: SteamClient.Shutdown does not work #267

@unleashed7

Description

@unleashed7

It does not close the app (Spacewar) in Steam, no matter when or how it is called. Am I doing something wrong?

#if UNITY_EDITOR
using UnityEditor;
using Steamworks;
using UnityEngine;

[InitializeOnLoad]
public class SteamShutdownHook
{
    static SteamShutdownHook()
    {
        EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
    }

    private static void OnPlayModeStateChanged(PlayModeStateChange state)
    {
        if (state == PlayModeStateChange.ExitingPlayMode)
        {
            if (SteamClient.IsValid)
            {
                SteamClient.Shutdown();
            }
        }
    }
}
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions