移除不用的脚本

This commit is contained in:
Bob.Song
2026-02-26 16:08:15 +08:00
parent 06e5d9ae1a
commit be43dbbf46
4999 changed files with 5034 additions and 845474 deletions

View File

@@ -13,6 +13,11 @@ namespace SRDebugger.Services
/// </summary>
bool IsUsable { get; }
/// <summary>
/// Link to the privacy policy for the current bug report handler.
/// </summary>
string PrivacyPolicyUrl { get; }
/// <summary>
/// Set the handler that will submit bug reports.
/// </summary>

View File

@@ -3,10 +3,12 @@
namespace SRDebugger.Services
{
public delegate void ConsoleStateChangedEventHandler(LogType logType, bool newState);
public delegate void ConsoleTextFilterChangedEventHandler(string newFilter);
public interface IConsoleFilterState
{
event ConsoleStateChangedEventHandler FilterStateChange;
event ConsoleTextFilterChangedEventHandler TextFilterChange;
/// <summary>
/// Set whether log messages with <paramref name="logType"/> severity
@@ -23,5 +25,10 @@ namespace SRDebugger.Services
/// <param name="logType">Type of message (only Error/Warning/Log are used. <see cref="LogType.Exception"/> and <see cref="LogType.Assert"/> will redirect to <see cref="LogType.Error"/></param>
/// <returns>True if the log type is displayed.</returns>
bool GetConsoleFilterState(LogType logType);
/// <summary>
/// What text is the console log being filtered by.
/// </summary>
string TextFilter { get; set; }
}
}

View File

@@ -4,22 +4,17 @@ namespace SRDebugger.Services
using System;
using Profiler;
using SRF.Service;
#if UNITY_2018_1_OR_NEWER
using UnityEngine.Rendering;
using UnityEngine.Experimental.Rendering;
#endif
public static class ProfilerServiceSelector
{
[ServiceSelector(typeof(IProfilerService))]
public static Type GetProfilerServiceType()
{
#if UNITY_2018_1_OR_NEWER
if(GraphicsSettings.defaultRenderPipeline != null)
{
return typeof(SRPProfilerService);
}
#endif
return typeof(ProfilerServiceImpl);
}

View File

@@ -18,6 +18,14 @@
}
}
public string PrivacyPolicyUrl
{
get
{
return _handler != null ? _handler.PrivacyPolicyUrl : string.Empty;
}
}
public void SetHandler(IBugReporterHandler handler)
{
Debug.LogFormat("[SRDebugger] Bug Report handler set to {0}", handler);

View File

@@ -3,14 +3,16 @@ using SRDebugger.Services;
using SRF.Service;
using UnityEngine;
namespace StompyRobot.SRDebugger.Scripts.Services.Implementation
namespace SRDebugger.Assets.StompyRobot.SRDebugger.Scripts.Services.Implementation
{
[Service(typeof(IConsoleFilterState))]
public sealed class ConsoleFilterStateService : IConsoleFilterState
{
public event ConsoleStateChangedEventHandler FilterStateChange;
public event ConsoleTextFilterChangedEventHandler TextFilterChange;
private readonly bool[] _states;
private string _textFilter = "";
public ConsoleFilterStateService()
{
@@ -41,6 +43,18 @@ namespace StompyRobot.SRDebugger.Scripts.Services.Implementation
return _states[(int)type];
}
public string TextFilter
{
get => _textFilter;
set {
if (value != _textFilter)
{
_textFilter = value;
TextFilterChange?.Invoke(value);
}
}
}
private static LogType GetType(LogType type)
{
switch (type)

View File

@@ -15,7 +15,7 @@
[Service(typeof(ISystemInformationService))]
public class StandardSystemInformationService : ISystemInformationService
{
private readonly Dictionary<string, IList<InfoEntry>> _info = new Dictionary<string, IList<InfoEntry>>();
private readonly Dictionary<string, List<InfoEntry>> _info = new Dictionary<string, List<InfoEntry>>();
public StandardSystemInformationService()
{
@@ -29,7 +29,7 @@
public IList<InfoEntry> GetInfo(string category)
{
IList<InfoEntry> list;
List<InfoEntry> list;
if (!_info.TryGetValue(category, out list))
{
@@ -42,7 +42,7 @@
public void Add(InfoEntry info, string category = "Default")
{
IList<InfoEntry> list;
List<InfoEntry> list;
if (!_info.TryGetValue(category, out list))
{
@@ -84,7 +84,7 @@
private void CreateDefaultSet()
{
_info.Add("System", new[]
_info.Add("System", new List<InfoEntry>
{
InfoEntry.Create("Operating System", UnityEngine.SystemInfo.operatingSystem),
InfoEntry.Create("Device Name", UnityEngine.SystemInfo.deviceName, true),
@@ -98,7 +98,7 @@
if (SystemInfo.batteryStatus != BatteryStatus.Unknown)
{
_info.Add("Battery", new[]
_info.Add("Battery", new List<InfoEntry>
{
InfoEntry.Create("Status", UnityEngine.SystemInfo.batteryStatus),
InfoEntry.Create("Battery Level", UnityEngine.SystemInfo.batteryLevel)
@@ -111,7 +111,7 @@
const string IL2CPP = "No";
#endif
_info.Add("Unity", new[]
_info.Add("Unity", new List<InfoEntry>
{
InfoEntry.Create("Version", Application.unityVersion),
InfoEntry.Create("Debug", Debug.isDebugBuild),
@@ -129,7 +129,7 @@
InfoEntry.Create("SRDebugger Version", SRDebug.Version),
});
_info.Add("Display", new[]
_info.Add("Display", new List<InfoEntry>
{
InfoEntry.Create("Resolution", () => Screen.width + "x" + Screen.height),
InfoEntry.Create("DPI", () => Screen.dpi),
@@ -138,7 +138,7 @@
InfoEntry.Create("Orientation", () => Screen.orientation),
});
_info.Add("Runtime", new[]
_info.Add("Runtime", new List<InfoEntry>
{
InfoEntry.Create("Play Time", () => Time.unscaledTime),
InfoEntry.Create("Level Play Time", () => Time.timeSinceLevelLoad),
@@ -181,7 +181,7 @@
_info.Add("Build", manifestList);
}
_info.Add("Features", new[]
_info.Add("Features", new List<InfoEntry>
{
InfoEntry.Create("Location", UnityEngine.SystemInfo.supportsLocationService),
InfoEntry.Create("Accelerometer", UnityEngine.SystemInfo.supportsAccelerometer),
@@ -191,21 +191,15 @@
});
#if UNITY_IOS
_info.Add("iOS", new[] {
#if UNITY_5 || UNITY_5_3_OR_NEWER
_info.Add("iOS", new List<InfoEntry>
{
InfoEntry.Create("Generation", UnityEngine.iOS.Device.generation),
InfoEntry.Create("Ad Tracking", UnityEngine.iOS.Device.advertisingTrackingEnabled),
#else
InfoEntry.Create("Generation", iPhone.generation),
InfoEntry.Create("Ad Tracking", iPhone.advertisingTrackingEnabled),
#endif
});
#endif
#pragma warning disable 618
_info.Add("Graphics - Device", new[]
_info.Add("Graphics - Device", new List<InfoEntry>
{
InfoEntry.Create("Device Name", UnityEngine.SystemInfo.graphicsDeviceName),
InfoEntry.Create("Device Vendor", UnityEngine.SystemInfo.graphicsDeviceVendor),
@@ -214,7 +208,7 @@
InfoEntry.Create("Max Tex Size", UnityEngine.SystemInfo.maxTextureSize),
});
_info.Add("Graphics - Features", new[]
_info.Add("Graphics - Features", new List<InfoEntry>
{
InfoEntry.Create("UV Starts at top", UnityEngine.SystemInfo.graphicsUVStartsAtTop),
InfoEntry.Create("Shader Level", UnityEngine.SystemInfo.graphicsShaderLevel),