1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using UnityEngine;
- namespace LLM.Editor.Analysis
- {
- /// <summary>
- /// Provides access to Unity's project-wide settings assets.
- /// Note: This is a basic implementation. A full version would require
- /// specific logic for each settings type (Physics, Time, etc.).
- /// </summary>
- public class ProjectSettingsProvider : IContextProvider
- {
- public object GetContext(Object target, string qualifier)
- {
- if (string.IsNullOrEmpty(qualifier))
- {
- return "Error: A settings type (qualifier) is required (e.g., 'Physics', 'Time').";
- }
- // A real implementation would have a switch statement or dictionary
- // to handle different settings types and serialize them appropriately.
- switch (qualifier.ToLower())
- {
- case "physics":
- return new
- {
- Physics.gravity, Physics.defaultSolverIterations
- // Add other relevant physics settings here
- };
- case "time":
- return new
- {
- Time.fixedDeltaTime,
- maximumAllowedTimestep = Time.maximumDeltaTime
- // Add other relevant time settings here
- };
- default:
- return $"Error: Project settings for '{qualifier}' are not supported yet.";
- }
- }
- }
- }
|