public void Refresh() { this.enabled = false; // reset markers Radar = null; CompassBar = null; Indicator = null; Minimap = null; // create marker references CreateMarkerReferences(); this.enabled = true; }
void CreateMinimapMarker() { if (Prefabs.MinimapPrefab == null) { return; } // create minimap gameobject GameObject minimapGO = Instantiate(Prefabs.MinimapPrefab.gameObject, Vector3.zero, Quaternion.identity) as GameObject; minimapGO.transform.SetParent(HUDNavigationCanvas.Instance.Minimap.ElementContainer, false); minimapGO.SetActive(false); // assign minimap prefab Minimap = minimapGO.GetComponent <HNSMinimapPrefab> (); }