Changing AppId to be passed into the Init instead of manually setting env vars

This commit is contained in:
Chris Bell 2024-12-08 21:54:09 -06:00
parent 24edfec9c0
commit b89eb1b74c

View File

@ -1,14 +1,7 @@
extends Node
func _init() -> void:
# Set your game's Steam app ID here
OS.set_environment("SteamAppId", str(480))
OS.set_environment("SteamGameId", str(480))
func _ready() -> void:
var init_result = Steam.steamInit()
var init_result = Steam.steamInit(true, 480)
if init_result["status"] <= 1: # Check if initialization was successful
GameConsole.print_line("Steam is running!")
var steamId = Steam.getSteamID()