Skip to main content

StatSource.AddRemoteStatSource

Declaration#

public virtual void AddRemoteStatSource(string key, StatSource source)

Parameters#

NameDescription
keyKey to use for registering new source
sourceSource to register

Description#

Add a new keyed remote Stat Source for use in formulas/expressions

Usage#

Example
using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour{
    public void ExampleMethod(StatSource target, StatSource other)    {        // Registering another source allows you to address its stats        // In this example via myId:StatId        target.AddRemoteStatSource("myId", other);    }
}