#if UNITY_EDITOR using UnityEditor; using UnityEngine; using XGame.MiniGame; namespace XGame.Editor { public static class PcMiniGameSmokeMenu { [MenuItem("XWorld/PC Smoke/Create Lobby Flow Launcher")] public static void CreateLobbyLauncher() { var go = GameObject.Find("PcLobbySmoke"); if (go == null) go = new GameObject("PcLobbySmoke"); var launcher = go.GetComponent(); if (launcher == null) launcher = go.AddComponent(); launcher.GatewayUrl = "ws://127.0.0.1:5005/ws?pid=1"; Selection.activeObject = go; EditorGUIUtility.PingObject(go); } [MenuItem("XWorld/PC Smoke/Create MiniGame Smoke Launcher")] public static void CreateLauncher() { var go = GameObject.Find("PcMiniGameSmoke"); if (go == null) go = new GameObject("PcMiniGameSmoke"); var launcher = go.GetComponent(); if (launcher == null) launcher = go.AddComponent(); launcher.GatewayUrl = "ws://127.0.0.1:5005/ws?pid=1"; launcher.GameId = "rps"; launcher.Version = 1; Selection.activeObject = go; EditorGUIUtility.PingObject(go); } } } #endif