Fix loading possesable avatar by name
This commit is contained in:
parent
d6de90fbe9
commit
c512dd42c3
@ -298,8 +298,17 @@ namespace Passer {
|
|||||||
yield break;
|
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);
|
Debug.Log("Load: " + possessablePath);
|
||||||
prefab = assetBundle.LoadAsset<GameObject>(possessablePath);
|
prefab = assetBundle.LoadAsset<GameObject>(possessableName); // possessablePath);
|
||||||
if (prefab == null) {
|
if (prefab == null) {
|
||||||
Debug.LogError("Could not load " + possessablePath);
|
Debug.LogError("Could not load " + possessablePath);
|
||||||
yield break;
|
yield break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user