Skip to content

Effect Configuration

Damnae edited this page Feb 18, 2023 · 6 revisions

Configuring Effects

Rather than making a lot of similar effects with slightly different values, the same effect can be used multiple times by configuring it.

Clicking the gear icon in the Effects tab opens the configuration for that effect. Changing an effect's configuration will cause it to update with that new value.

All effects have the random seed parameter by default. This allows changing the sequence of random numbers returned by the script's Random() method calls. Different effects may have additional parameters, like with the Spectrum example.

Making Effects Configurable

Public fields of a script can be made configurable by adding the [Configurable] attribute.

    [Configurable] public int StartTime = 0;

The following types are supported: string, int, float, double, bool, enum, Vector2, Vector3 and Color4.

Groups and description

You can also add other attributes to a configurable:

[Group] will add a header before the configurable in the configuration interface.

    [Group("Timing")]
    [Configurable] public int StartTime = 0;        
    [Configurable] public int EndTime = 0;

[Description] will add a tooltip to the name of the configurable in the configuration interface.

    [Description("The point in time at which the effect starts")]
    [Configurable] public int StartTime = 0;