From 8ca2a93f87d4f0748327bd52663510167e7702ee Mon Sep 17 00:00:00 2001 From: Chromum Date: Fri, 9 May 2025 11:39:58 +0000 Subject: [PATCH] Add Nodes/Images/FromPathNode --- Nodes%2FImages%2FFromPathNode.md | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Nodes%2FImages%2FFromPathNode.md diff --git a/Nodes%2FImages%2FFromPathNode.md b/Nodes%2FImages%2FFromPathNode.md new file mode 100644 index 0000000..bdaec32 --- /dev/null +++ b/Nodes%2FImages%2FFromPathNode.md @@ -0,0 +1,47 @@ +# From Path Node (Generic) + +--- + +## 🔌 INPUT PORTS + +| Name | Type | Description | +|--------|----------|------------------------------------------------| +| Path | `string` | The file path to the asset to load. This must be a valid path in the Unity project. | + +--- + +## 📤 EXPORT PORTS + +| Name | Type | Description | +|--------|---------------------|--------------------------------------------------| +| Output | `T` (Generic Type) | The asset loaded from the specified path. This is of type `T`, which can be any Unity asset (e.g., `Texture2D`, `Mesh`, `GameObject`). | + +--- + +## 📝 DESCRIPTION + +The **From Path Node (Generic)** is a reusable node that allows you to load a Unity asset directly from a file path. This node can be used for different asset types by changing the generic type `T` to match the asset type you're working with (e.g., `Texture2D`, `Mesh`, `GameObject`, etc.). + + +--- + +### **Specific Node Implementations:** +1. **Texture2DFromPath**: A specific implementation of the `FromPathNode` for loading a `Texture2D` asset from a given path. + - **Usage**: This node is ideal for loading texture assets dynamically. + +2. **MeshFromPath**: A specific implementation of the `FromPathNode` for loading a `Mesh` asset. + - **Usage**: This node is useful when dynamically loading mesh assets (e.g., 3D models). + +3. **PrefabFromPath**: A specific implementation of the `FromPathNode` for loading a `GameObject` prefab. + - **Usage**: This node allows for dynamically loading prefabs (e.g., characters, environment objects) from a file path. + +These specific nodes are essentially type aliases for the generic `FromPathNode`, and they ensure that the asset loaded is of the correct type (e.g., `Texture2D`, `Mesh`, or `Prefab`). + +--- + +## ⚠️ KNOWN ISSUES + + +--- + +