Skip to content

Commit c1567f6

Browse files
committed
Update on Skybox
1 parent 92df455 commit c1567f6

7 files changed

Lines changed: 875 additions & 6 deletions

File tree

MCPForUnity/Editor/Helpers/AssetPathUtility.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public static string SanitizeAssetPath(string path)
4747
}
4848

4949
// Ensure path starts with Assets/
50+
if (string.Equals(path, "Assets", StringComparison.OrdinalIgnoreCase))
51+
{
52+
return "Assets";
53+
}
5054
if (!path.StartsWith("Assets/", StringComparison.OrdinalIgnoreCase))
5155
{
5256
return "Assets/" + path.TrimStart('/');

MCPForUnity/Editor/Tools/Graphics/ManageGraphics.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,22 @@ public static object HandleCommand(JObject @params)
134134
};
135135
}
136136

137+
// --- Skybox / Environment actions (always available) ---
138+
case "skybox_get":
139+
return SkyboxOps.GetEnvironment(@params);
140+
case "skybox_set_material":
141+
return SkyboxOps.SetMaterial(@params);
142+
case "skybox_set_properties":
143+
return SkyboxOps.SetMaterialProperties(@params);
144+
case "skybox_set_ambient":
145+
return SkyboxOps.SetAmbient(@params);
146+
case "skybox_set_fog":
147+
return SkyboxOps.SetFog(@params);
148+
case "skybox_set_reflection":
149+
return SkyboxOps.SetReflection(@params);
150+
case "skybox_set_sun":
151+
return SkyboxOps.SetSun(@params);
152+
137153
default:
138154
return new ErrorResponse(
139155
$"Unknown action: '{action}'. Valid actions: ping, "
@@ -144,7 +160,9 @@ public static object HandleCommand(JObject @params)
144160
+ "bake_create_reflection_probe, bake_set_probe_positions, "
145161
+ "stats_get, stats_list_counters, stats_set_scene_debug, stats_get_memory, "
146162
+ "pipeline_get_info, pipeline_set_quality, pipeline_get_settings, pipeline_set_settings, "
147-
+ "feature_list, feature_add, feature_remove, feature_configure, feature_toggle, feature_reorder.");
163+
+ "feature_list, feature_add, feature_remove, feature_configure, feature_toggle, feature_reorder, "
164+
+ "skybox_get, skybox_set_material, skybox_set_properties, skybox_set_ambient, "
165+
+ "skybox_set_fog, skybox_set_reflection, skybox_set_sun.");
148166
}
149167
}
150168
catch (Exception ex)

0 commit comments

Comments
 (0)