Note
This project is obsolete. You no longer need to install the Procedural Graph Client plugin to use Procedural Graph. Procedural Graph Core now includes all the features of this plugin.
Procedural Graph Client is a Flax Engine Editor Plugin designed to manage and execute procedural graph generation in real-time. It serves as the runtime execution layer for the Procedural Graph system, handling the lifecycle of graph nodes, listening for scene changes, and managing asynchronous generation tasks to ensure editor responsiveness.
- Real-Time Generation: Automatically triggers graph generation when compatible actors are spawned or modified in the scene.
- Live Parameter Updates: Listens for
Node.ParametersChangedevents and updates the graph in real-time with a debounce mechanism (0.2s) to prevent performance stuttering. - Asynchronous Execution: Utilizing
TaskandCancellationToken, graph generation runs asynchronously, keeping the Flax Editor UI responsive. - Scene State Management: Tracks nodes per scene and handles serialization/deserialization of graph data (
SceneData/{SceneName}/Procedural Graph.json). - Actor Lifecycle Hooks: Automatically registers nodes when actors are spawned and cleans up resources when actors are deleted.
- Download: Clone this repository into the
Pluginsfolder of your Flax project. - Submodules: Ensure you fetch the required submodules (specifically the Core).
See
git submodule update --init --recursive
.gitmodulesfor details.
Once installed and enabled in the Flax Editor, the Procedural Graph Client runs automatically in the background.
- Actor Integration: When you create or spawn an actor that is compatible with the Procedural Graph system, the client detects it via
Level.ActorSpawned. - Node Conversion: It uses the
ProceduralGraphBuilderto convert the actor into a processingNode. - Editing: As you modify public variables or parameters on the node/actor, the client detects the change and schedules a regeneration task.
- Saving: Graph data is automatically managed and saved to
SceneData/<SceneName>/Procedural Graph.jsonupon scene serialization.
ProceduralGraphClient.cs: The mainEditorPluginentry point. It manages the dictionary of activeNodeGeneratorHandles and orchestrates the event loops for spawning, updating, and deleting nodes.NodeGeneratorHandle.cs: A wrapper that manages the threading synchronization (SemaphoreSlim) and cancellation tokens for a specific node's generation task.SceneInfo.cs: Handles the loading and saving of the graph JSON data relative to the current scene.
This project is licensed under the PolyForm Shield License 1.0.0.
Summary: You are free to use, modify, and distribute this software, provided you do not use it to build a product that competes with the software itself.
Please see the LICENSE.md file for the full legal text.