Skip to main content

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โ€‹

MethodDescription
ShowWindow()Opens the debug window
ShowWindow(ScriptableObject target)Opens window focused on specific asset
  • 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โ€‹

ModeDescription
GameObjectCentricShows dependencies from GameObject perspective
AssetCentricShows dependencies from ScriptableObject perspective
GraphInteractive node-based graph view

Methodsโ€‹

MethodParametersDescription
AnalyzeDependencies()-Scans project for SOAP dependencies
ExportDependencyReport()string filePathExports analysis to file
RefreshVisualization()-Updates dependency data
FocusOnAsset(ScriptableObject asset)ScriptableObject assetCenters view on specific asset
FilterByType(Type type)Type typeFilters display by asset type
  • 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โ€‹

MethodParametersDescription
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 filePathExports profiling data

Performance Metricsโ€‹

MetricDescription
EventsPerSecondEvent raising frequency
ListenerCountTotal active listeners
VariableUpdatesPerFrameVariable changes per frame
MemoryUsageSOAP system memory consumption
GCAllocationsGarbage collection allocations
  • 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โ€‹

MethodDescription
ShowWindow()Opens the Asset Cleaner window with automatic scan
  • 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โ€‹

ModeDescription
SingleCreate individual assets
BatchCreate multiple assets at once
TemplateCreate from predefined templates

Methodsโ€‹

MethodParametersDescription
CreateVariable<T>(string name, T initialValue)string name, T initialValueCreates typed variable
CreateEvent<T>(string name)string nameCreates typed event
CreateFromTemplate(string templateName)string templateNameCreates from template
BatchCreateAssets(AssetCreationData[] data)AssetCreationData[] dataBatch asset creation
SaveAsTemplate(string templateName)string templateNameSaves current config as template
  • 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โ€‹

MethodParametersDescription
EnableOverlay()-Activates hierarchy overlay
DisableOverlay()-Deactivates hierarchy overlay
RefreshOverlay()-Updates overlay data
SetOverlayMode(OverlayMode mode)OverlayMode modeChanges display mode

Overlay Modesโ€‹

ModeDescription
ConnectionsShows SOAP asset connections
StatusDisplays system health status
PerformanceShows performance indicators
AllCombined overlay information
  • 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

SOAPKitMenuโ€‹

Centralized menu system with quick actions and utilities.

public static class SOAPKitMenu

Static Methodsโ€‹

MethodParametersDescription
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
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โ€‹

MethodReturn TypeDescription
ValidateProject()ValidationReportValidates entire project
ValidateAsset(ScriptableObject asset)AssetValidationResultValidates specific asset
FindUnusedAssets()ScriptableObject[]Identifies unused assets
FindBrokenReferences()BrokenReferenceInfo[]Finds broken references
GenerateHealthReport()ProjectHealthReportCreates comprehensive report

Validation Categoriesโ€‹

CategoryDescription
ReferencesNull and broken reference detection
PerformancePerformance issue identification
ArchitectureDesign pattern violations
MemoryMemory leak and optimization issues
NamingAsset 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
  • Path: Tools > SoapKit > Settings
  • Project Settings: Edit > Project Settings > SoapKit

Best Practicesโ€‹

Tool Usageโ€‹

  1. Use Debug Window during development for real-time monitoring
  2. Regular dependency analysis to maintain clean architecture
  3. Performance profiling before production builds
  4. Asset validation as part of build pipeline

Performance Monitoringโ€‹

  1. Enable profiling during intensive development phases
  2. Monitor event frequency in complex systems
  3. Regular memory usage analysis
  4. Automated performance regression testing

Project Organizationโ€‹

  1. Use Asset Creator for consistent asset creation
  2. Regular unused asset cleanup
  3. Dependency visualization for refactoring
  4. Template-based asset creation for teams

Debugging Workflowโ€‹

  1. Start with Debug Window for overview
  2. Use Dependency Visualizer for complex issues
  3. Performance Analyzer for optimization
  4. Hierarchy/Scene overlays for visual debugging

See Alsoโ€‹