Skip to content

Pipeliner helps you execute sequences, such as initializing social services, loading savegames, loading scenes, level generation and more using custom made Steps.

License

Notifications You must be signed in to change notification settings

Sokka06/Pipeliner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 

Repository files navigation

Module Controller

What is it?

Pipeliner helps you execute sequences, such as initializing social services, loading savegames, loading scenes, level generation and more using custom made Steps.

Getting started

  1. Clone or download repository.
  2. Copy Pipeliner folder from Plugins folder to your project.
  3. Take a look at the included Demos.
  4. Done!

Developed in Unity 2020.3.23f1, but I don't see why it wouldn't work in any Unity version.

How To Use

  1. Create a new script for your custom Step (named FooStep, for example). Step classes are used to execute your logic. Your class should look something like this:
public struct FooStepParameters : IStepParameters
{
    public float Value;
}

public class FooStep : AbstractStep
{
    public FooStep(FooStepParameters parameters) : base(parameters)
    {
    }

    public override IEnumerator Run(Action<IStepResult> result)
    {
        yield return null;
        var parameters = (FooStepParameters)Parameters;

        // Your custom logic here

        Progress = 1f;
        result?.Invoke(new IStepResult.Success());
    }
}
  1. Create new scripts for your Step Factories (named FooStepBehaviour and FooStepObject, for example). Factories are used to create a new instance of your step in MonoBehaviour and Scriptable Object pipelines. Your factory classes should look something like this:
public class FooStepBehaviour : StepFactoryBehaviour
{
    public override IStep[] Create()
    {
        return new IStep[] {new FooStep(new FooStepParameters{Value = 0f})};
    }
}

[CreateAssetMenu(fileName = "Foo Step", menuName = "Foo/Step")]
public class FooStepObject : StepFactoryObject
{
    public override IStep[] Create()
    {
        return new IStep[] {new FooStep(new FooStepParameters{Value = 0f})};
    }
}
  1. Add a Pipeline Runner and Pipeline GameObjects to your scene (found in GameObject/Pipeliner) and drag Pipeline GameObject to the Pipeline field in Runner GameObject.
  2. Add your custom FooStepBehaviour script to the Pipeline GameObject.
  3. Press play!

Demos

1. Basic

A basic example that prints Debug.Logs using a MonoBehaviour Pipeline.

2. Scriptable Objects

A demo that uses Scriptable Object Pipelines and Steps.

3. Custom Steps

A demo that shows how to use Pipeliner to initialize services and save data using custom Steps.

4. Scripting

A demo that shows how to create and run a Pipeline and Steps in script to load menus and levels.

Notes

Assets

DoTween Font Awesome

Models

Car Kit Platformer Kit Input Prompts

Effects

Explosion

Sounds

Engine Skid Impact1 Impact2 Impact3 Explosion

About

Pipeliner helps you execute sequences, such as initializing social services, loading savegames, loading scenes, level generation and more using custom made Steps.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published