ManipulationContextService
ManipulationContextService
Service for managing ManipulationContext objects. Handles the business logic that was previously in Godot’s ManipulationData. Integrates with ManipulationService2D for complete manipulation lifecycle management.
Project: GridPlacement v6.0
Layer: Core
Source: Core/Services/Manipulation/ManipulationContextService.cs
Namespace: GridBuilding.Core.Services.Manipulation
Kind: class
Parsing Method: AST-based (Roslyn) - NOT regex
⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.
Methods
CreateContext
Creates a new manipulation context.
Returns: ManipulationContext
Parameters:
string manipulatorIdstring targetObjectIdManipulationAction action
CreateMoveContext
Creates a move manipulation context with preview object.
Returns: ManipulationContext
Parameters:
string manipulatorIdstring targetObjectIdstring previewObjectId
GetContext
Gets a manipulation context.
Returns: ManipulationContext?
Parameters:
string manipulatorIdstring targetObjectIdManipulationAction action
UpdateContext
Updates a manipulation context.
Returns: bool
Parameters:
string manipulatorIdstring targetObjectIdManipulationAction actionAction<ManipulationContext> updateAction
RemoveContext
Removes a manipulation context.
Returns: bool
Parameters:
string manipulatorIdstring targetObjectIdManipulationAction action
GetContextsByManipulator
Gets all contexts for a specific manipulator.
Returns: IEnumerable<ManipulationContext>
Parameters:
string manipulatorId
GetContextsByTarget
Gets all contexts for a specific target.
Returns: IEnumerable<ManipulationContext>
Parameters:
string targetObjectId
GetActiveContexts
Gets all active contexts.
Returns: IEnumerable<ManipulationContext>
ValidateContext
Validates a manipulation context.
Returns: ValidationResult
Parameters:
ManipulationContext context
ValidateAndUpdateContext
Validates and updates a context.
Returns: bool
Parameters:
string manipulatorIdstring targetObjectIdManipulationAction action
ClearAllContexts
Removes all contexts.
Returns: void
CleanupCompletedContexts
Removes completed contexts older than the specified time.
Returns: int
Parameters:
TimeSpan maxAge