API Reference › Services
IEngineService
InterfaceNamespace: SwiftlyS2.Shared.Services · Assembly: SwiftlyS2.CS2.dll
public interface IEngineServiceProperties
Gets a reference to the global variables structure.
ref CGlobalVars GlobalVars { get; }Property Value
Methods
DispatchParticleEffect(string, ParticleAttachment_t, byte, CUtlSymbolLarge, CRecipientFilter, bool, int, CBaseEntity?)
Dispatches a particle effect to the specified recipients. Thread unsafe, use async variant instead for non-main thread context.
void DispatchParticleEffect(string particleName, ParticleAttachment_t attachmentType, byte attachmentPoint, CUtlSymbolLarge attachmentName, CRecipientFilter filter, bool resetAllParticlesOnEntity = false, int splitScreenSlot = 0, CBaseEntity? entity = null)Parameters
- particleNamestringThe name of the particle effect.
- attachmentTypeParticleAttachment_tThe type of attachment for the particle effect.
- attachmentPointbyteThe attachment point for the particle effect.
- attachmentNameCUtlSymbolLargeThe name of the attachment for the particle effect.
- filterCRecipientFilterThe recipient filter for the particle effect.
- resetAllParticlesOnEntitybooloptionalWhether to reset all particles on the entity.
- splitScreenSlotintoptionalThe split screen slot for the particle effect.
- entityCBaseEntity?optionalThe entity to attach the particle effect to.
DispatchParticleEffectAsync(string, ParticleAttachment_t, byte, CUtlSymbolLarge, CRecipientFilter, bool, int, CBaseEntity?)
Dispatches a particle effect to the specified recipients asynchronously.
Task DispatchParticleEffectAsync(string particleName, ParticleAttachment_t attachmentType, byte attachmentPoint, CUtlSymbolLarge attachmentName, CRecipientFilter filter, bool resetAllParticlesOnEntity = false, int splitScreenSlot = 0, CBaseEntity? entity = null)Parameters
- particleNamestringThe name of the particle effect.
- attachmentTypeParticleAttachment_tThe type of attachment for the particle effect.
- attachmentPointbyteThe attachment point for the particle effect.
- attachmentNameCUtlSymbolLargeThe name of the attachment for the particle effect.
- filterCRecipientFilterThe recipient filter for the particle effect.
- resetAllParticlesOnEntitybooloptionalWhether to reset all particles on the entity.
- splitScreenSlotintoptionalThe split screen slot for the particle effect.
- entityCBaseEntity?optionalThe entity to attach the particle effect to.
Executes the specified command string in the current context.
void ExecuteCommand(string command)Parameters
- commandstringThe command to execute. Cannot be null or empty.
Executes the specified command string in the current context asynchronously.
Task ExecuteCommandAsync(string command)Parameters
- commandstringThe command to execute. Cannot be null or empty.
Returns
Executes the specified command string in the current context.
[Obsolete("This method is planned to be removed.")]
void ExecuteCommandWithBuffer(string command, Action<string> bufferCallback)Executes the specified command string in the current context with a buffer callback asynchronously.
[Obsolete("This method is planned to be removed.")]
Task ExecuteCommandWithBufferAsync(string command, Action<string> bufferCallback)Parameters
Returns
Find a game system by name.
nint? FindGameSystemByName(string name)Parameters
- namestringThe name of the game system.