using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using KairoEngine.Core; using KairoEngine.Core.ModuleSystem; using Sirenix.OdinInspector; namespace KairoEngine.SteamIntegration { public class SteamModule : GameModuleBase { public override string name => "Steam Module"; [LabelText("Steamworks App ID")] public uint appId = 0000000; public bool showDebug = false; public SteamModule(GameConfig config) : base(config) { this.gameConfig = config; this.className = this.GetType().AssemblyQualifiedName; this.typeName = "SteamModule"; } public override void Load(Transform parent) { GameObject obj = GameObject.Instantiate(new GameObject(), parent); obj.name = "SteamIntegration"; SteamworksManager steamworksManager = obj.AddComponent(); steamworksManager.appId = appId; steamworksManager.ShowDebug(showDebug); } public override void Start() { } public override void Reset() { } public override void Destroy() { } public static SteamModule JSONToSteamModule(string data) { try { return JsonUtility.FromJson(data); } catch (System.Exception e) { Debug.LogError($"Could not deserialize SteamModule: \n{e}"); return new SteamModule(null); } } public override void OnBeforeSerialize(ObjectSerializer serializer) { } public override void OnBeforeDeserialize(ObjectSerializer serializer) { } } }