Saving & Loading
Data Methods
Example
public partial class ExampleBlackboard : IBlackboard
{
private int _health = 100;
private int _ammo = 50;
private int _lives = 3;
}public partial class ExampleBlackboard : IExampleBlackboard
{
public ExampleBlackboardData ToData()
{
return new ExampleBlackboardData
{
Health = this.HealthSignal.Value,
Ammo = this.AmmoSignal.Value,
Lives = this.LivesSignal.Value,
};
}
public void FromData(ExampleBlackboardData data)
{
this.HealthSignal.Value = data.Health;
this.AmmoSignal.Value = data.Ammo;
this.LivesSignal.Value = data.Lives;
}
}
public class ExampleBlackboardData
{
public int Health;
public int Ammo;
public int Lives;
}Saving to Data
Loading from Data
DontSaveAttribute
JSON Methods
Saving to JSON
Loading from JSON
Note
Last updated