diff --git a/Runtime/Visitors/Scripts/VisitorPossessions.cs b/Runtime/Visitors/Scripts/VisitorPossessions.cs index 0abee0e..7a96146 100644 --- a/Runtime/Visitors/Scripts/VisitorPossessions.cs +++ b/Runtime/Visitors/Scripts/VisitorPossessions.cs @@ -298,8 +298,17 @@ namespace Passer { yield break; } + string possessableName = possessablePath; + int lastSlashIx = possessablePath.LastIndexOf('/'); + if (lastSlashIx >= 0) + possessableName = possessablePath.Substring( + 1); + //string[] assetPaths = assetBundle.GetAllAssetNames(); + //foreach (string assetPath in assetPaths) { + // Debug.Log(" " + assetPath); + //} + Debug.Log("Load: " + possessablePath); - prefab = assetBundle.LoadAsset(possessablePath); + prefab = assetBundle.LoadAsset(possessableName); // possessablePath); if (prefab == null) { Debug.LogError("Could not load " + possessablePath); yield break;