docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Context nodes usage

    Explore the following documentation to discover the value of context nodes and guidance on when to use them, illustrated with relevant Unity examples.

    Before you proceed, please make sure you're familiar with the concepts described in Introduction to context nodes.
    If you're looking for technical implementation guidance, refer to Implement a context node.

    When to use context nodes

    Context nodes are valuable when:

    • multiple operations logically belong together
    • operations need to follow a specific execution order
    • multiple operations require the same parameters
    • you need to restrict operations users can perform in a section
    • complex logic must be broke down into manageable segments

    Use case examples

    Here are two examples to highlight the previous scenarios.

    Example 1: A cinematic look

    In the context of a post-processing pipeline, consider a Cinematic Look context node that can contain blocks for depth of field, bloom, grading, grain, and vignette effects. Each block handles a specific post-processing effect, while sharing a global opacity setting. The user can choose to use one or several effects, the order of the blocks has an effect on the final look.

    Cinematic Look context node example in a Graph Toolkit canvas

    The Cinematic Look context node demonstrates how you can use a context node to do the following:

    • group visual effects and have a unified toggling,
    • process the visual effects in the correct rendering sequence,
    • govern the rendering via a shared global parameter, like opacity,
    • constrain the context node to include only rendering-compatible blocks.

    This design ensures artistic integrity and simplified control.

    Example 2: A mission system

    In the context of a mission system, consider a context node to define a mission with blocks for objectives and rewards. Game designers can add objectives blocks of different types like collecting items, killing enemies, going to a location and assign a specific prefab representing the objects to spawn (for example: herbs, wolfs). They can also add reward blocks to provide the player with XPs and currencies on success.

    Mission context node example in a Graph Toolkit canvas

    The Mission Context node is another demonstration of how you can use context nodes to do the following:

    • group related quest elements together,
    • enforce the correct sequence (player must complete the objectives before receiving rewards),
    • allows the game designer to define common settings once and use them in all blocks,
    • prevent the game designer to insert incompatible blocks into the mission flow

    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • When to use context nodes
    • Use case examples
      • Example 1: A cinematic look
      • Example 2: A mission system
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)