Skip to content

studentutu/FluentPlayableApi

Repository files navigation

Unity Fluent API for Playable API

FluentPlayableAPI

Quick Navigation

Summary

Fluent Playable API is a compact declaration layer over Unity's PlayableGraph (Playable API). It helps create, connect, name, resolve, and verify Unity playables while still returning a normal Unity PlayableGraph.

The builder does not own the graph; it only provides helper API to author and verify it.

It addresses a current issue with Unity graph authoring problem: Unity provides a flat view, while Fluent Playable API keeps topology visible and maintainable in code.

The API is intentionally small. It does not replace Unity's graph types, own graph lifetime, or add project-specific animation concepts.

Fluent API for playable graph helps to read, maintain and quickly change the topology.

Verification helps to ensure and catch mistakes early. See Validation.

Custom extension is easy to make and helps organize logic into a building blocks. See Project Extensions.

Fluent API for playable graph helps read, maintain and quickly change the topology.

This repository hosts the development environment and samples for the underlying package: Packages/com.studentutu.fluentplayableapi/README.md.

Start Here

  1. Start with Install.
  2. Fluent API documentation: Packages/com.studentutu.fluentplayableapi/README.md
  3. Embedded package (see Install): Packages/com.studentutu.fluentplayableapi

Project usage example

See SampleScene and AnimationGraphExample.cs for Fluent Playable API usage. Use PlayableGraphMonitor (Window -> Analysis -> PlayableGraphMonitor) to view the graph and individual connections.

For more in-depth examples, see the Package README.

Install

The distributable Unity package lives at Packages/com.studentutu.fluentplayableapi. If you only need the package in another project, install that package path directly instead of copying repository files by hand.

Install as Git dependency via Package Manager

  1. Open Package Manager in Unity (Window -> Package Manager).
  2. Click + in the top-left corner.
  3. Select Add package from git URL....
  4. Enter the following URL and click Add:
https://github.com/studentutu/FluentPlayableApi.git?path=/FluentPlayableApi/Packages/com.studentutu.fluentplayableapi

NOTE: If you want to pin the install, append #branch, #tag, or a commit SHA. Do not assume repo tags map cleanly to package.json versions.

Install by editing Packages/manifest.json

  1. Close Unity if it is holding the manifest open.
  2. Open Packages/manifest.json.
  3. Add the package entry under "dependencies":
"com.studentutu.fluentplayableapi": "https://github.com/studentutu/FluentPlayableApi.git?path=/FluentPlayableApi/Packages/com.studentutu.fluentplayableapi"
  1. Reopen the project in Unity and let Package Manager resolve the dependency.

Install from local disk

If this repository is already checked out next to your Unity project, you can point manifest.json to the package folder directly:

"com.studentutu.fluentplayableapi": "file:../path-to-cloned-repo/FluentPlayableApi/Packages/com.studentutu.fluentplayableapi"

Replace ../path-to-cloned-repo with the actual relative path from your Unity project's Packages/manifest.json file to this repository clone.

Agentic Workflow

  1. Read AGENTS.md before repo work.
  2. Fast compile: ./rebuildSolutionWithRiderMsBuild.sh
  3. Full Unity compile and solution refresh: ./rebuildSolutionFromUnityItself.sh
  4. Run Unity tests: ./runTestsFromRoot.sh
  5. Parse Unity test output: ./runParsetests.sh
  6. If Unity, Rider, or Git Bash are installed elsewhere, update the hardcoded paths in those scripts and in .vscode/tasks.json.

Configure The Workflow

Repo Requirements

  1. Unity Hub with a Unity 6000.0+ editor installation.
  2. Git and Git Bash.
  3. Rider or another MSBuild-capable setup.
  4. VS Code is optional, but the repository's agentic task wrappers are configured there.

Verification

  1. Fast compile output: CI/RiderMsBuild.log
  2. Unity compile output: CI/CompileErrorsAfterUnityRun.txt
  3. Unity test output: CI/CITestOutput.xml
  4. Unity test log: CI/UnityLogs.log

License

MIT license.

  1. Root repository license: LICENSE
  2. Package license: Packages/com.studentutu.fluentplayableapi/LICENSE

About

Fluent API for Unity Playable API with validations. Unity Playable Graph with fluent API

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors