Exemple #1
0
        ////////////////////////////////////////
        //
        // Event Functions

        protected void OnElementClicked(ModelBrowserElement asset)
        {
            if (ModelViewDataSelected != null)
            {
                ModelViewDataSelected(asset.ViewData);
            }

            DisplayAttributionText(asset.ViewData);
        }
Exemple #2
0
        protected void DisplayModel(ModelViewData modelViewData)
        {
            GameObject assetMenuItemGameObject = GameObject.Instantiate(elementPrefab, menuParent);

            ModelBrowserElement modelBrowserElement = assetMenuItemGameObject.GetComponent <ModelBrowserElement> ();

            modelBrowserElement.SetData(modelViewData);
            modelBrowserElement.ClickedAction += OnElementClicked;
        }