V3.1 Upgrade guide

Breaking changes

AgentTypeBuilder

Instead of manually creating an AgentTypeBuilder instance, you should now use the CreateBuilder method on the AgentTypeFactoryBase class.

// Old way
var builder = new AgentTypeBuilder(SetIds.Smith);

// New way
var builder = this.CreateBuilder(SetIds.Smith);

IGoapInjector

The IGoapInjector interface has been expanded with two new methods:

public interface IGoapInjector
{
    void Inject(IAction action);
    void Inject(IGoal goal);
    void Inject(ISensor sensor);
    // New methods
    void Inject(IAgentTypeFactory factory);
    void Inject(ICapabilityFactory factory);
}

New Features

You can now make dynamic conditions (code only)!

AgenTypeFactory and CapabilityFactory can now be injected

You can now inject into AgentTypeFactoryBase and CapabilityFactoryBase classes, similar to other actions, goals and sensors.

You can now manually call AgentBehaviour.Run() with custom deltaTimes

This allows you to determine the rate at which agents are updated, for example agents further away from the player.

Make sure to set AgentBehaviour.RunInUnityUpdate to false before calling Run yourself!

Last updated