Add Nodes/Images/FromPathNode

Chromum 2025-05-09 11:39:58 +00:00
parent d28eabcd4e
commit 8ca2a93f87

@ -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
---