Animace + Menu

This commit is contained in:
Dominik G.
2025-10-05 18:18:12 +02:00
parent b52b3aa830
commit 550efdfaad
2192 changed files with 602748 additions and 2703 deletions

View File

@@ -0,0 +1,77 @@
#if STEAMWORKSNET
using UnityEngine;
using Steamworks;
namespace MegaKoop.Steam
{
/// <summary>
/// Minimal Steam bootstrapper. Keeps SteamAPI initialized and runs callbacks.
/// Add this to your bootstrap scene once.
/// </summary>
public class SteamManager : MonoBehaviour
{
public static SteamManager Instance { get; private set; }
public static bool Initialized { get; private set; }
private void Awake()
{
if (Instance != null && Instance != this)
{
Destroy(gameObject);
return;
}
Instance = this;
DontDestroyOnLoad(gameObject);
try
{
Initialized = SteamAPI.Init();
}
catch (System.DllNotFoundException e)
{
Debug.LogError($"[SteamManager] Steamworks DLL not found: {e.Message}");
Initialized = false;
}
if (!Initialized)
{
Debug.LogError("[SteamManager] SteamAPI.Init failed. Is Steam running? Is the app configured?");
}
}
private void Update()
{
if (Initialized)
{
SteamAPI.RunCallbacks();
}
}
private void OnDestroy()
{
if (Instance == this)
{
if (Initialized)
{
SteamAPI.Shutdown();
Initialized = false;
}
Instance = null;
}
}
}
}
#else
using UnityEngine;
namespace MegaKoop.Steam
{
public class SteamManager : MonoBehaviour
{
private void Awake()
{
Debug.LogWarning("[SteamManager] STEAMWORKSNET define not set. Install Steamworks.NET and add Scripting Define Symbol 'STEAMWORKSNET'.");
}
}
}
#endif