Ejemplo n.º 1
0
        void Visualize()
        {
            if (visualization != null)
            {
                Destroy(visualization.gameObject);
            }

            Visualization prefab = visualizationPrefabs.Find(viz => viz.resolution == currentResolution);

            if (prefab != null)
            {
                CreateVisualization(prefab.gameObject);
            }
        }
Ejemplo n.º 2
0
 void CreateVisualization(GameObject prefab)
 {
     visualization = (Instantiate(prefab, transform.position, transform.rotation) as GameObject).GetComponent <Visualization>();
     visualization.transform.SetParent(transform);
     visualization.transform.localScale = Vector3.one;
 }