Esempio n. 1
0
 private void LoadPrefab()
 {
     if (assetBundleTag != null)
     {
         AssetBundle assetBundle = WWAssetBundleController.GetAssetBundle(assetBundleTag);
         if (assetBundle != null)
         {
             prefab = assetBundle.LoadAsset(path) as GameObject;
         }
     }
     else
     {
         prefab = Resources.Load(path) as GameObject;
     }
 }
        protected override void Setup()
        {
            base.Setup();

            inFrontOfCamera = true;

            Debug.Log("AssetBundleMenu Start: inFrontOfCamera = " + inFrontOfCamera);

            buttonPrefab    = (Button)Resources.Load("Prefabs/Buttons/AssetBundleButton", typeof(Button));
            assetBundleTags = new List <string>(WWAssetBundleController.GetAllAssetBundles().Keys);

            panel = GameObject.FindWithTag("UIPanel");

            // TODO: Turn this back on after Alphafest
            //WWMenuBuilder.BuildMenu(buttonPrefab, assetBundleTags, panel, this);
        }