RoundedRectangleAgentFacade supports capability discovery, inspection, creation, shape/style/effect updates, one-transaction configuration, composition creation, read-only layout analysis, render-path conversion, cache configuration, PNG export, and validation.
Mutating actions support dryRun and validateAfter. Results include changed fields, warnings, validation issues, target references, and sceneSaved: false. The facade never saves the scene.
Use Assets/RoundedRectangle/AgentSkill/rounded-rectangle-unity/references/action-contract.md for the current request and response fields.
Inspect a selection from C# (no MCP required)
Save this as Assets/Editor/RoundedRectangleInspectExample.cs. Select a Rounded Rectangle GameObject, then choose Tools > My Project > Inspect Selected Rounded Rectangle. The Console shows its current state, warnings, and validation issues. This read-only action does not change or save the scene.
using RoundedRectangle;
using UnityEditor;
using UnityEngine;
public static class RoundedRectangleInspectExample
{
[MenuItem("Tools/My Project/Inspect Selected Rounded Rectangle")]
public static void InspectSelected()
{
if (Selection.activeGameObject == null)
{
Debug.Log("Select a Rounded Rectangle GameObject first.");
return;
}
var result = RoundedRectangleAgentFacade.Execute(
new RoundedRectangleAgentRequest
{
action = "inspect",
targetInstanceId = Selection.activeGameObject.GetInstanceID()
});
if (result.success)
Debug.Log(JsonUtility.ToJson(result, true));
else
Debug.LogWarning(result.message);
}
}