From 444c89f86a25d3f6d3f79dd0a40cc942c2876f3e Mon Sep 17 00:00:00 2001 From: Chromum Date: Fri, 9 May 2025 11:44:16 +0000 Subject: [PATCH] Add Nodes/Image/VariableNode --- Nodes%2FImage%2FVariableNode.md | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Nodes%2FImage%2FVariableNode.md diff --git a/Nodes%2FImage%2FVariableNode.md b/Nodes%2FImage%2FVariableNode.md new file mode 100644 index 0000000..39b9218 --- /dev/null +++ b/Nodes%2FImage%2FVariableNode.md @@ -0,0 +1,50 @@ +# 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**. They’re 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 don’t 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. + +---