Unityゲーム画面用のFigma Make(Figma AI)投入プロンプトを壁打ちで設計・生成する。UI Toolkit(UXML/USS)への変換を見据えた制約込み。ユーザーが「Figma用のプロンプトを作りたい」「画面デザインの壁打ちをしたい」と言ったら使う。
The English summary is being prepared. Showing the original description.
Interact with UI Toolkit (UXML/USS) runtime UI in PlayMode. Use INSTEAD OF uloop-simulate-mouse-ui / uloop-simulate-mouse-input whenever the target UI is UI Toolkit — those tools only reach uGUI and report 'no UI element hit' or silently do nothing on UI Toolkit panels.
The English summary is being prepared. Showing the original description.
Review the instructions the agent will receive before you install.
uloop-cli 2.2.0 + Unity 6000.4.5f1 で実測した制約:
simulate-mouse-input(Mouse.current注入)は Success=true でも UI Toolkit の Button.clicked が発火しないsimulate-mouse-ui は EventSystem + InputSystemUIInputModule + PanelRaycaster が揃っていても「no UI element hit」になる(uGUI前提)screenshot --annotate-elements true は UI Toolkit 要素を検出しない(AnnotatedElements が空になる)screenshot --capture-mode rendering は UI Toolkit 要素が全てシアンの矩形に化ける.csx ファイルに C# を書いて実行する:
npx --yes uloop-cli@2.2.0 execute-dynamic-code --code-file <path>.csx --project-path <unity-project>
ボタンクリック(Button.clicked を発火させる標準形):
using UnityEngine;
using UnityEngine.UIElements;
var doc = Object.FindFirstObjectByType<UIDocument>();
var root = doc.rootVisualElement;
var button = root.Q<Button>("onigiri-button"); // name指定。classなら Query<Button>(className: "shop-buy").ToList()
using (var e = new NavigationSubmitEvent())
{
e.target = button;
button.SendEvent(e);
}
return "clicked: " + button.name;
element.value = x; で直接設定してよい(変更通知は using var ev = ChangeEvent<T>.GetPooled(old, new); ev.target = element; element.SendEvent(ev);)System.IO や AssetDatabase.CreateFolder は execute-dynamic-code では禁止スクショの目視より確実。操作と同じ .csx 内で実行結果を返す:
string count = root.Q<Label>("onigiri-count").text;
return $"count=[{count}]";
npx --yes uloop-cli@2.2.0 screenshot --window-name Game --output-directory <dir> --project-path <unity-project>
--capture-mode rendering は使わない(UI Toolkitがシアン化して正しく評価できない)control-play-mode --action Play でPlayMode開始(enum は Play/Stop/Pause。小文字は不可)screenshot --window-name Game で見た目を確認control-play-mode --action StopNo reviews yet. Tell others what you thought.
No login needed. Share how it worked for you, ask a question, or note where it did not run.
No comments yet. Be the first to write one.
Unityゲーム画面用のFigma Make(Figma AI)投入プロンプトを壁打ちで設計・生成する。UI Toolkit(UXML/USS)への変換を見据えた制約込み。ユーザーが「Figma用のプロンプトを作りたい」「画面デザインの壁打ちをしたい」と言ったら使う。
The English summary is being prepared. Showing the original description.
デザイン(Figma MCP出力・HTML/CSS・デザイン仕様)からUI Toolkit用UXML/USSを生成し、Unityへのインポート・シーン配置・コンパイル・スクショ検証・ゲームロジック結線検証まで自動で行う。「この画面をUnityに取り込んで」「UXML/USSにして」で使う。
The English summary is being prepared. Showing the original description.
Clear Unity Console entries. Use before compile, tests, or debugging when stale logs would hide the current result.
The English summary is being prepared. Showing the original description.
Compile the Unity project and report errors/warnings. Use after C# edits or when a full Domain Reload compile is needed.
The English summary is being prepared. Showing the original description.
Control Unity Editor Play Mode. Use to start, stop, or pause Play Mode for runtime behavior checks and frame inspection.
The English summary is being prepared. Showing the original description.
Execute C# with Unity APIs when existing uloop tools cannot inspect or edit enough. Use for scene, prefab, SerializedObject, AssetDatabase refresh/.meta generation, menu, or PlayMode automation.
The English summary is being prepared. Showing the original description.