1
Nodes/Image/VariableNode
Chromum edited this page 2025-05-09 11:44:16 +00:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Variable Node (Generic)


🔌 INPUT PORTS

Name Type Description
Variable Name string The name of the variable that holds the value to output.

📤 EXPORT PORTS

Name Type Description
Output T (Generic Type) The value of type T from the specified variable. This can be any Unity asset (e.g., Texture2D, Mesh, GameObject).

📝 DESCRIPTION

The Variable Node (Generic) is a temporary utility node that allows you to set and output a value of type T within the graph. This node can be used to inject any value, such as a Texture2D, Mesh, or Prefab, into the graph and output it for use in further processing.

⚠️ Current Use:

At the moment, these nodes are primarily useful for an upcoming batching feature. Theyre not extremely useful in their current state, but they can be used to force assets into the graph. This will help pre-load data into the graph before batch processing happens, ensuring that the assets are available when the feature is fully implemented.


Specific Node Implementations:

  1. Texture2DVariableNode: A specific implementation of the VariableNode for storing a Texture2D asset.

    • Usage: Use this node to inject a texture into the graph, though it won't do much until the batching feature is active.
  2. MeshVariableNode: A specific implementation of the VariableNode for storing a Mesh asset.

    • Usage: Similar to the Texture2DVariableNode, but for meshes. You can force a mesh into the graph to be used later.
  3. PrefabVariableNode: A specific implementation of the VariableNode for storing a GameObject prefab.

    • Usage: Use this node to store and reference prefabs, even though its functionality is limited until batching is fully implemented.

These specific nodes are type aliases for the generic VariableNode, and they ensure that the asset type is correctly specified.


⚠️ KNOWN ISSUES

  • Batching Not Implemented: These nodes currently dont provide full functionality until the batching feature is implemented. At the moment, their main use is to force assets into the graph, but their true power will come when batching allows multiple assets to be processed together efficiently.
  • Limited Use: While you can use these nodes now, their real benefit is in future batch processing workflows that will optimize asset loading and graph operations.