Animace + Menu
This commit is contained in:
41
Editor/ProjectSetupTools.cs
Normal file
41
Editor/ProjectSetupTools.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace MegaKoop.EditorTools
|
||||
{
|
||||
public static class ProjectSetupTools
|
||||
{
|
||||
[MenuItem("Tools/MegaKoop/Steam/Enable 'STEAMWORKSNET' Define", priority = 5)]
|
||||
public static void EnableSteamworksDefine()
|
||||
{
|
||||
var group = EditorUserBuildSettings.selectedBuildTargetGroup;
|
||||
var defines = PlayerSettings.GetScriptingDefineSymbolsForGroup(group);
|
||||
if (!defines.Contains("STEAMWORKSNET"))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(defines)) defines += ";";
|
||||
defines += "STEAMWORKSNET";
|
||||
PlayerSettings.SetScriptingDefineSymbolsForGroup(group, defines);
|
||||
Debug.Log($"[Setup] Added 'STEAMWORKSNET' define to {group}. Recompiling...");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[Setup] 'STEAMWORKSNET' already present.");
|
||||
}
|
||||
}
|
||||
|
||||
[MenuItem("Tools/MegaKoop/Steam/Show Setup Instructions", priority = 6)]
|
||||
public static void ShowSteamSetupInstructions()
|
||||
{
|
||||
Debug.Log(
|
||||
"STEAM SETUP:\n" +
|
||||
"1) Install Steamworks.NET (Package/Asset).\n" +
|
||||
"2) Run Tools > MegaKoop > Steam > Enable 'STEAMWORKSNET' Define.\n" +
|
||||
"3) Ensure Steam client is running.\n" +
|
||||
"4) Optional: place steam_appid.txt (e.g., 480) beside the built .exe for local builds.\n" +
|
||||
"5) Press Play. Host -> Invite overlay opens automatically."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user