docs.unity3d.com
    Show / Hide Table of Contents

    Automators

    An Automator is a script for controlling a segment of gameplay. Automators can be recordings, agents, or custom c# scripts.

    Please email us at AutomatedQA@unity3d.com with any questions or suggestions about this feature!

    Automated Run

    An Automated Run is used to configure a list of Automators to play in sequence.

    • The AutomatedRun object links together recordings and custom C# scripts to automate gameplay.
    • Create an AutomatedRun with the Create > Automated QA > Automated Run menu
    • Click Run in the inspector for the Automated Run to start playback.

    Default Automators

    See Default Automators for a list of Automators provided out of the box with this package.

    Custom Automators

    • Extend the Automator class to create a custom automator script.
    • Extend the AutomatorConfig class for your Automator to expose it in the AutomatedRun inspector.

    See Example Automators for more information.

    CentralAutomationController

    You can use the CentralAutomationController to automate gameplay programmatically.

    An AutomatedRun asset can be passed to the CentralAutomationController to run it:

    public AutomatedRun automatedRun;
    void Start()
    {
        CentralAutomationController.Instance.Run(automatedRun.config);
    }
    

    The CentralAutomationController can be also be configured programmatically:

    CentralAutomationController.Instance.AddAutomator<RecordedPlaybackAutomator>();
    CentralAutomationController.Instance.Run();
    

    Config data can also be created programmatically:

    var config = new AutomatedRun.RunConfig();
    config.automators.AddRange( new List<AutomatorConfig>{
        new LoadLevelAutomatorConfig()
        {
            scene = "SampleScene"
        },
        new RecordedPlaybackAutomatorConfig()
        {
            recordingFilePath = "Recordings/recording1.json"
        },
    });
    
    CentralAutomationController.Instance.Run(config);
    
    In This Article
    • Automated Run
    • Default Automators
    • Custom Automators
    • CentralAutomationController
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023