public void InstantiateObjectFromBundle(AssetStruct node) { string nameItem = node.ObjectName; string descriptionItem = node.ObjectDescription; UnityEngine.Object prefab = currentAB.LoadAsset(node.Assetname); GameObject.Find("Controller").GetComponent <GlobalController>().InstantiatePrefab(prefab, nameItem, node.Assetname, descriptionItem); }
private void LoadAssets() { String[] assetNames = currentAB.GetAllAssetNames(); listAssets = new List <AssetStruct>(); for (int i = 0; i < assetNames.Length; ++i) { AssetStruct tmpAs = new AssetStruct(); String tmpName = assetNames[i]; tmpName = tmpName.Replace(".prefab", ""); string[] tmpchain = tmpName.Split('/'); tmpName = tmpchain[tmpchain.Length - 1]; tmpAs.Assetname = tmpName; tmpAs.ObjectName = ""; tmpAs.ObjectDescription = ""; listAssets.Add(tmpAs); } }