BlueBeard.Effects 0.1.0-ci.24

This is a prerelease version of BlueBeard.Effects.
dotnet add package BlueBeard.Effects --version 0.1.0-ci.24
                    
NuGet\Install-Package BlueBeard.Effects -Version 0.1.0-ci.24
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlueBeard.Effects" Version="0.1.0-ci.24" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlueBeard.Effects" Version="0.1.0-ci.24" />
                    
Directory.Packages.props
<PackageReference Include="BlueBeard.Effects" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlueBeard.Effects --version 0.1.0-ci.24
                    
#r "nuget: BlueBeard.Effects, 0.1.0-ci.24"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BlueBeard.Effects@0.1.0-ci.24
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BlueBeard.Effects&version=0.1.0-ci.24&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=BlueBeard.Effects&version=0.1.0-ci.24&prerelease
                    
Install as a Cake Tool

BlueBeard.Effects

A managed effect emitter system for Unturned. Spawn visual effects at world positions using spatial patterns and audience targeting, with automatic lifecycle management.

Installation

Add a project reference:

<ProjectReference Include="..\BlueBeard.Effects\BlueBeard.Effects.csproj" />

Setup

using BlueBeard.Effects;

// In your plugin:
var effectManager = new EffectEmitterManager();
effectManager.Load();

// On unload:
effectManager.Unload(); // stops and destroys all active emitters

Spawning Effects

One-Shot Effect

Spawn an effect once at a position:

using BlueBeard.Effects;
using BlueBeard.Effects.Patterns;
using BlueBeard.Effects.Audiences;

var definition = new EffectDefinition
{
    EffectId = 1234,
    Pattern = new SinglePointPattern(),
    Origin = position,
    OneShot = true,
    SnapToSurface = true
};

effectManager.Start(definition, new AllPlayersAudience());

Repeating Effect

Spawn effects on a loop (e.g., zone border particles):

var definition = new EffectDefinition
{
    EffectId = 5678,
    Pattern = new CirclePattern(radius: 15f, pointCount: 20),
    Origin = zoneCenter,
    OneShot = false,
    Interval = 2f, // seconds between each cycle
    SnapToSurface = true
};

var emitter = effectManager.Start(definition, new AllPlayersAudience());

// Stop it later:
effectManager.Stop(emitter);

Patterns

Patterns define where effects are spawned (as offsets from Origin).

Pattern Description Constructor
SinglePointPattern Single effect at the origin new SinglePointPattern()
CirclePattern Points evenly spaced around a circle new CirclePattern(radius, pointCount)
SquarePattern Points along the edges of a square new SquarePattern(size, pointsPerSide)
ScatterPattern Random points within a radius ScatterPattern.Random(origin, count, radius, minDistance)

Custom Patterns

Implement IEffectPattern:

using BlueBeard.Effects.Patterns;

public class CrossPattern : IEffectPattern
{
    private readonly float _size;
    public CrossPattern(float size) { _size = size; }

    public IEnumerable<Vector3> GetPoints()
    {
        yield return new Vector3(-_size, 0, 0);
        yield return new Vector3(_size, 0, 0);
        yield return new Vector3(0, 0, -_size);
        yield return new Vector3(0, 0, _size);
        yield return Vector3.zero;
    }
}

Audiences

Audiences define who sees the effects.

Audience Description Constructor
AllPlayersAudience Every connected player new AllPlayersAudience()
SinglePlayerAudience One specific player new SinglePlayerAudience(player)
PlayerGroupAudience Filtered subset of players new PlayerGroupAudience(predicate)

Custom Audiences

Implement IEffectAudience:

using BlueBeard.Effects.Audiences;

public class NearbyPlayersAudience : IEffectAudience
{
    private readonly Vector3 _center;
    private readonly float _range;

    public NearbyPlayersAudience(Vector3 center, float range)
    {
        _center = center;
        _range = range;
    }

    public IEnumerable<ITransportConnection> GetRecipients()
    {
        foreach (var client in Provider.clients)
        {
            if (Vector3.Distance(client.player.transform.position, _center) <= _range)
                yield return client.transportConnection;
        }
    }
}

EffectDefinition

Property Type Default Description
EffectId ushort 0 The Unturned effect asset ID
Pattern IEffectPattern null Spatial pattern for effect positions
Origin Vector3 zero World origin; pattern offsets are added to this
Interval float 0 Seconds between cycles (for repeating effects)
SnapToSurface bool true Raycast positions down to the ground
OneShot bool false If true, emit once and auto-cleanup

Events

// EffectEmitter fires Completed when a one-shot finishes:
emitter.Completed += e => Logger.Log("Effect finished");
Product Compatible and additional computed target framework versions.
.NET Framework net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-ci.24 79 7/4/2026
0.1.0-ci.23 87 6/25/2026
0.1.0-ci.22 93 5/8/2026
0.1.0-ci.19 60 5/7/2026
0.1.0-ci.18 61 5/7/2026
0.1.0-ci.17 63 5/3/2026
0.1.0-ci.16 77 5/3/2026
0.1.0-ci.15 77 4/13/2026
0.1.0-ci.14 78 4/12/2026
0.1.0-ci.13 71 4/12/2026
0.1.0-ci.12 69 4/12/2026
0.1.0-ci.11 71 4/12/2026
0.1.0-ci.10 82 4/11/2026
0.1.0-ci.9 76 4/7/2026
0.1.0-ci.8 70 4/7/2026
0.1.0-ci.7 68 4/7/2026
0.1.0-ci.6 78 3/14/2026
0.1.0-ci.5 75 2/22/2026