path | The asset path to query dependencies for. Pass empty string ("") to get all dependencies in the table. |
string[] String[] - Array of file paths representing the asset's dependencies.
Retrieves a list of file dependencies for a specific asset path.
These dependencies include external files that the asset relies on, such as textures, materials, or other referenced assets. When called with an empty string, returns all asset dependencies in the table.
using UnityEngine;
public class DependencyExample : MonoBehaviour { public InstantAssetTable assetTable; void Start() { // Get dependencies for a specific asset string[] dependencies = assetTable.GetAssetDependencies("assets/models/player.fbx"); Debug.Log($"Player model has {dependencies.Length} dependencies:"); foreach (string dep in dependencies) { Debug.Log($" - {dep}"); } // Get all dependencies in the table string[] allDependencies = assetTable.GetAssetDependencies(""); Debug.Log($"Total dependencies in table: {allDependencies.Length}"); } }