Editor Tools API Reference
Complete API reference for SoapKit's editor tools and development utilities.
Core Editor Windowsโ
SoapKitDebugWindowโ
Main debugging interface for monitoring variables and events in real-time.
public class SoapKitDebugWindow : EditorWindow
Static Methodsโ
| Method | Description |
|---|---|
ShowWindow() | Opens the debug window |
ShowWindow(ScriptableObject target) | Opens window focused on specific asset |
Menu Accessโ
- Path:
Tools > SoapKit > Debug Window - Shortcut:
Ctrl+Shift+D(Windows) /Cmd+Shift+D(Mac)
Featuresโ
Variable Monitoring
- Live value display with type-specific formatting
- Change frequency tracking
- Constraint validation status
- Real-time value editing
Event Monitoring
- Listener count display
- Event frequency analysis
- History tracking with timestamps
- Manual event triggering
Performance Metrics
- Memory usage per asset
- Update frequency statistics
- Performance hotspot detection
- System health indicators
Usage Exampleโ
// Open debug window programmatically
[MenuItem("Custom/Open SOAP Debug")]
static void OpenDebugWindow()
{
SoapKitDebugWindow.ShowWindow();
}
// Focus on specific variable
[MenuItem("CONTEXT/IntVariable/Debug This Variable")]
static void DebugVariable(MenuCommand command)
{
var variable = command.context as IntVariable;
SoapKitDebugWindow.ShowWindow(variable);
}
SOAPDependencyVisualizerโ
Interactive dependency graph showing relationships between SOAP assets and GameObjects.
public class SOAPDependencyVisualizer : EditorWindow
View Modesโ
| Mode | Description |
|---|---|
GameObjectCentric | Shows dependencies from GameObject perspective |
AssetCentric | Shows dependencies from ScriptableObject perspective |
Graph | Interactive node-based graph view |
Methodsโ
| Method | Parameters | Description |
|---|---|---|
AnalyzeDependencies() | - | Scans project for SOAP dependencies |
ExportDependencyReport() | string filePath | Exports analysis to file |
RefreshVisualization() | - | Updates dependency data |
FocusOnAsset(ScriptableObject asset) | ScriptableObject asset | Centers view on specific asset |
FilterByType(Type type) | Type type | Filters display by asset type |
Menu Accessโ
- Path:
Tools > SoapKit > Dependency Visualizer - Context: Right-click any SOAP asset >
Analyze Dependencies
Featuresโ
Interactive Graph
- Draggable nodes with smooth layout
- Color-coded by asset type
- Connection strength indicators
- Zoom and pan navigation
Analysis Tools
- Unused asset detection
- Circular dependency identification
- Usage frequency analysis
- Orphaned reference detection
Export Options
- PNG/SVG graph export
- CSV dependency report
- JSON data export
- Integration with external tools
Usage Exampleโ
// Programmatic dependency analysis
[MenuItem("Tools/Analyze SOAP Dependencies")]
static void AnalyzeDependencies()
{
var window = EditorWindow.GetWindow<SOAPDependencyVisualizer>();
window.AnalyzeDependencies();
window.Show();
}
SOAPPerformanceAnalyzerโ
Real-time performance monitoring and optimization recommendations.
public class SOAPPerformanceAnalyzer : EditorWindow
Methodsโ
| Method | Parameters | Description |
|---|---|---|
StartProfiling() | - | Begins performance data collection |
StopProfiling() | - | Stops profiling and analyzes results |
GeneratePerformanceReport() | - | Creates detailed performance report |
DetectHotspots() | - | Identifies performance bottlenecks |
ShowOptimizationRecommendations() | - | Displays optimization suggestions |
ExportProfileData(string filePath) | string filePath | Exports profiling data |
Performance Metricsโ
| Metric | Description |
|---|---|
EventsPerSecond | Event raising frequency |
ListenerCount | Total active listeners |
VariableUpdatesPerFrame | Variable changes per frame |
MemoryUsage | SOAP system memory consumption |
GCAllocations | Garbage collection allocations |
Menu Accessโ
- Path:
Tools > SoapKit > Performance Analyzer - Context: Available in SoapKit Debug Window
Featuresโ
Real-Time Monitoring
- Live performance graphs
- Hotspot highlighting
- Memory leak detection
- Frame rate impact analysis
Optimization Recommendations
- Event frequency reduction suggestions
- Memory optimization tips
- Architecture improvement advice
- Performance best practices
Reporting
- Automated performance reports
- Historical trend analysis
- Comparison with benchmarks
- Integration with CI/CD pipelines
Usage Exampleโ
// Automated performance testing
public class SOAPPerformanceTester
{
[MenuItem("Tools/Run SOAP Performance Test")]
static void RunPerformanceTest()
{
var analyzer = EditorWindow.GetWindow<SOAPPerformanceAnalyzer>();
analyzer.StartProfiling();
// Run test scenarios
EditorApplication.delayCall += () =>
{
analyzer.StopProfiling();
analyzer.GeneratePerformanceReport();
};
}
}
Asset Management Toolsโ
SOAPAssetCleanerWindowโ
Professional unused asset cleaner with advanced selection interface and safe deletion.
public class SOAPAssetCleanerWindow : EditorWindow
Static Methodsโ
| Method | Description |
|---|---|
ShowWindow() | Opens the Asset Cleaner window with automatic scan |
Menu Accessโ
- Path:
Tools > SoapKit > Quick Actions > Clean Unused Assets - Window:
Window > SoapKit > Asset Cleaner
Featuresโ
Smart Detection
- Scans all ScriptableObjects in project for SOAP assets
- Analyzes scene usage to identify truly unused assets
- Progress bar for large projects with hundreds of assets
- Handles missing/corrupted assets gracefully
Advanced Selection Interface
- Individual checkboxes for each unused asset
- Tri-state "Select All" with mixed state support
- "Apply to filtered only" vs "Apply to all" scope options
- "Invert Selection" for complex selection patterns
Powerful Filtering & Sorting
- Real-time search by asset name, type, or path
- Sort by Name, Type, or Path (ascending/descending)
- Clear filter button for quick reset
- Live filtering updates as you type
Visual Asset Information
- Asset icons from Unity's asset database
- Full asset path display for precise identification
- Type name display (IntVariable, BoolGameEvent, etc.)
- Click asset name to select and ping in Project window
Safe Deletion Workflow
- Double confirmation dialog with asset preview
- Shows up to 7 assets in confirmation, with "and X more" summary
- Batch deletion with progress tracking
- Detailed success/failure reporting
- Automatic rescan after deletion
Additional Tools
- ๐ Ping button to locate asset in Project window
- ๐ Reveal button to show asset in Finder/Explorer
- Asset count and selection summary in header
- Warning about version control for recovery
Usage Exampleโ
// Open Asset Cleaner programmatically
[MenuItem("Custom/Clean My Assets")]
static void OpenAssetCleaner()
{
SOAPAssetCleanerWindow.ShowWindow();
}
// Get unused assets programmatically
public static List<ScriptableObject> GetUnusedSOAPAssets()
{
var unused = new List<ScriptableObject>();
string[] guids = AssetDatabase.FindAssets("t:ScriptableObject");
foreach (string guid in guids)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
var asset = AssetDatabase.LoadAssetAtPath<ScriptableObject>(path);
if (asset != null && SOAPKitMenu.IsSOAPAsset(asset))
{
if (!SOAPKitMenu.IsAssetUsedInScene(asset))
{
unused.Add(asset);
}
}
}
return unused;
}
SOAPAssetCreatorโ
Advanced asset creation tool with templates and batch operations.
public class SOAPAssetCreator : EditorWindow
Creation Modesโ
| Mode | Description |
|---|---|
Single | Create individual assets |
Batch | Create multiple assets at once |
Template | Create from predefined templates |
Methodsโ
| Method | Parameters | Description |
|---|---|---|
CreateVariable<T>(string name, T initialValue) | string name, T initialValue | Creates typed variable |
CreateEvent<T>(string name) | string name | Creates typed event |
CreateFromTemplate(string templateName) | string templateName | Creates from template |
BatchCreateAssets(AssetCreationData[] data) | AssetCreationData[] data | Batch asset creation |
SaveAsTemplate(string templateName) | string templateName | Saves current config as template |
Menu Accessโ
- Path:
Tools > SoapKit > Asset Creator - Context: Project window >
Create > SoapKit > ... - Shortcut:
Ctrl+Alt+N(Windows) /Cmd+Alt+N(Mac)
Featuresโ
Template System
- Predefined asset templates
- Custom template creation
- Template sharing and import
- Project-specific templates
Batch Operations
- Multi-asset creation
- Naming pattern support
- Folder organization
- Automatic reference setup
Validation
- Name conflict detection
- Type compatibility checking
- Folder structure validation
- Asset dependency verification
Usage Exampleโ
// Custom asset creation
[MenuItem("Game/Create Player Stats")]
static void CreatePlayerStats()
{
var creator = EditorWindow.GetWindow<SOAPAssetCreator>();
creator.CreateVariable<int>("PlayerHealth", 100);
creator.CreateVariable<int>("PlayerMana", 50);
creator.CreateVariable<float>("PlayerSpeed", 5.0f);
creator.CreateEvent<int>("OnHealthChanged");
creator.CreateEvent<int>("OnManaChanged");
}
Property Drawers and Inspectorsโ
BaseVariableEditorโ
Enhanced custom inspector for all variable types.
[CustomEditor(typeof(BaseVariable<>), true)]
public class BaseVariableEditor : Editor
Featuresโ
Real-Time Monitoring
- Live value display during play mode
- Change frequency indicators
- Last modified timestamp
- Historical value graph
Quick Actions
- One-click value reset
- Random value generation
- Constraint application
- Test value assignment
Debug Integration
- Direct integration with Debug Window
- Event history access
- Performance metrics display
- Listener count monitoring
GameEventEditorโ
Enhanced custom inspector for all event types.
[CustomEditor(typeof(GameEvent<>), true)]
public class GameEventEditor : Editor
Featuresโ
Listener Management
- Visual listener count display
- Listener type breakdown
- Add/remove listener tools
- Listener validation
Testing Tools
- Manual event triggering
- Parameter value editor
- Frequency testing
- Batch event operations
History Analysis
- Event timeline view
- Parameter history
- Frequency analysis graphs
- Export history data
SOAPPropertyDrawerโ
Enhanced property drawer for SOAP references in inspectors.
[CustomPropertyDrawer(typeof(BaseVariable<>), true)]
[CustomPropertyDrawer(typeof(GameEvent<>), true)]
public class SOAPPropertyDrawer : PropertyDrawer
Featuresโ
Visual Indicators
- Connection status indicators
- Value preview in inspector
- Type-specific icons
- Health status badges
Quick Actions
- Asset selection shortcuts
- Value monitoring toggle
- Direct asset creation
- Reference validation
Debug Integration
- Context menu debug options
- Direct window opening
- Asset highlighting
- Dependency visualization
Visualization Toolsโ
SOAPHierarchyOverlayโ
Hierarchy window integration showing SOAP connections and status.
public static class SOAPHierarchyOverlay
Static Methodsโ
| Method | Parameters | Description |
|---|---|---|
EnableOverlay() | - | Activates hierarchy overlay |
DisableOverlay() | - | Deactivates hierarchy overlay |
RefreshOverlay() | - | Updates overlay data |
SetOverlayMode(OverlayMode mode) | OverlayMode mode | Changes display mode |
Overlay Modesโ
| Mode | Description |
|---|---|
Connections | Shows SOAP asset connections |
Status | Displays system health status |
Performance | Shows performance indicators |
All | Combined overlay information |
Menu Accessโ
- Path:
Window > SoapKit > Hierarchy Overlay > ... - Toggle:
Alt+H(Windows) /Option+H(Mac)
Featuresโ
Visual Indicators
- Color-coded connection status
- Performance warning badges
- Asset type icons
- Health status indicators
Interactive Elements
- Click to select referenced assets
- Hover for detailed information
- Context menu integration
- Direct debugging access
Menu Systemโ
SOAPKitMenuโ
Centralized menu system with quick actions and utilities.
public static class SOAPKitMenu
Static Methodsโ
| Method | Parameters | Description |
|---|---|---|
ShowDebugWindow() | - | Opens debug window |
ShowAssetCreator() | - | Opens asset creator |
ScanCurrentScene() | - | Analyzes current scene for SOAP usage |
CleanUnusedAssets() | - | Opens Asset Cleaner window |
ListAllSOAPAssets() | - | Generates inventory report |
ValidateProject() | - | Runs project validation |
GenerateReport() | - | Creates system report |
OpenDocumentation() | - | Opens online documentation |
Quick Actionsโ
๐ Scan Current Scene
- Analyzes active scene for SOAP asset usage
- Reports GameObject count with SOAP connections
- Shows total connection count across all GameObjects
- Provides instant overview of scene complexity
๐งน Clean Unused Assets
- Opens professional Asset Cleaner window
- Smart detection of unused SOAP assets across project
- Advanced selection interface with tri-state functionality
- Safe deletion with double confirmation
- Batch operations with progress tracking
๐ List All SOAP Assets
- Comprehensive project inventory report
- Categorizes Events and Variables separately
- Shows type information for each asset
- Sorted alphabetically for easy navigation
Menu Structureโ
Tools/
โโโ SoapKit/
โ โโโ โ๏ธ Settings
โ โโโ ๐ Debug Console (Ctrl+Shift+D)
โ โโโ Dependency Visualizer
โ โโโ Performance Analyzer
โ โโโ Asset Creator (Ctrl+Alt+N)
โ โโโ โโโโโโโโโโโโโโโโโ
โ โโโ Quick Actions/
โ โ โโโ ๐ Scan Current Scene
โ โ โโโ ๐งน Clean Unused Assets
โ โ โโโ ๐ List All SOAP Assets
โ โโโ โโโโโโโโโโโโโโโโโ
โ โโโ Validation/
โ โ โโโ ๐ Find Null References
โ โ โโโ ๐ Generate Usage Report
โ โโโ โโโโโโโโโโโโโโโโโ
โ โโโ Help/
โ โ โโโ ๐ Open Documentation
โ โ โโโ ๐ฎ Open Example Scene
โ โ โโโ ๐ฌ About SoapKit
Window/
โโโ SoapKit/
โ โโโ Debug Window
โ โโโ Asset Creator
โ โโโ Asset Cleaner
โ โโโ Performance Analyzer
โ โโโ โโโโโโโโโโโโโโโโโ
โ โโโ Hierarchy Overlay/
โ โ โโโ Enable Connections
โ โ โโโ Enable Status
โ โ โโโ Enable Performance
โ โโโ Scene Overlay/
โ โโโ Enable Connections
โ โโโ Enable Values
โ โโโ Enable Events
Project Validationโ
SOAPValidatorโ
Comprehensive project validation and health checking.
public static class SOAPValidator
Static Methodsโ
| Method | Return Type | Description |
|---|---|---|
ValidateProject() | ValidationReport | Validates entire project |
ValidateAsset(ScriptableObject asset) | AssetValidationResult | Validates specific asset |
FindUnusedAssets() | ScriptableObject[] | Identifies unused assets |
FindBrokenReferences() | BrokenReferenceInfo[] | Finds broken references |
GenerateHealthReport() | ProjectHealthReport | Creates comprehensive report |
Validation Categoriesโ
| Category | Description |
|---|---|
References | Null and broken reference detection |
Performance | Performance issue identification |
Architecture | Design pattern violations |
Memory | Memory leak and optimization issues |
Naming | Asset naming convention validation |
Usage Exampleโ
[MenuItem("Tools/SoapKit/Validate Project")]
static void ValidateProject()
{
var report = SOAPValidator.ValidateProject();
if (report.HasErrors)
{
Debug.LogError($"Project validation failed with {report.ErrorCount} errors");
foreach (var error in report.Errors)
{
Debug.LogError(error.Message, error.Target);
}
}
if (report.HasWarnings)
{
Debug.LogWarning($"Project has {report.WarningCount} warnings");
}
Debug.Log($"Validation complete. Score: {report.HealthScore}/100");
}
Settings and Configurationโ
SOAPKitSettingsโ
Project-wide settings for SoapKit editor tools.
[CreateAssetMenu(menuName = "SoapKit/Settings")]
public class SOAPKitSettings : ScriptableObject
Settings Categoriesโ
Debug Settings
- Enable event history
- Performance monitoring frequency
- Debug overlay preferences
- Log verbosity levels
Performance Settings
- Profiling sample rates
- Memory monitoring thresholds
- Performance warning limits
- Optimization recommendations
UI Settings
- Window layout preferences
- Color schemes and themes
- Shortcut key customization
- Inspector enhancement options
Menu Accessโ
- Path:
Tools > SoapKit > Settings - Project Settings:
Edit > Project Settings > SoapKit
Best Practicesโ
Tool Usageโ
- Use Debug Window during development for real-time monitoring
- Regular dependency analysis to maintain clean architecture
- Performance profiling before production builds
- Asset validation as part of build pipeline
Performance Monitoringโ
- Enable profiling during intensive development phases
- Monitor event frequency in complex systems
- Regular memory usage analysis
- Automated performance regression testing
Project Organizationโ
- Use Asset Creator for consistent asset creation
- Regular unused asset cleanup
- Dependency visualization for refactoring
- Template-based asset creation for teams
Debugging Workflowโ
- Start with Debug Window for overview
- Use Dependency Visualizer for complex issues
- Performance Analyzer for optimization
- Hierarchy/Scene overlays for visual debugging
See Alsoโ
- Variables API Reference - Variable system documentation
- Events API Reference - Event system documentation
- Performance Guide - Optimization techniques
- Best Practices - Development guidelines