Add Nodes/Images/FromPathNode
parent
d28eabcd4e
commit
8ca2a93f87
47
Nodes%2FImages%2FFromPathNode.md
Normal file
47
Nodes%2FImages%2FFromPathNode.md
Normal file
@ -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
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user