void OnTriggerExit(Collider col) { if (col.CompareTag(triggerTag) && triggered) { //map.worldName = prevZone; if (generateOnTrigger) { if (useZoneBounds) { map.UpdateBounds(); } map.renderLayers = prevRenderLayers; NJGMap.GenerateMap(); if (Map.miniMap != null && Map.miniMap.zoom != prevZoom) { Map.miniMap.zoom = prevZoom; } if (Map.worldMap != null && Map.worldMap.zoom != prevZoomWorld) { Map.worldMap.zoom = prevZoomWorld; } } triggered = false; } }
void Start() { if (map.boundLayers.value == 0) { Debug.LogWarning("Can't render map photo. You have not choosen any layer for bounds calculation. Go to the NJGMiniMap inspector.", map); //NJGTools.DestroyImmediate(gameObject); return; } if (map.renderLayers.value == 0) { Debug.LogWarning("Can't render map photo. You have not choosen any layer for rendering. Go to the NJGMiniMap inspector.", map); //NJGTools.DestroyImmediate(gameObject); return; } map.UpdateBounds(); ConfigCamera(); //if (map.optimize) StartCoroutine(DelayedDestroy(gameObject, 2)); //if(!Application.isPlaying) Render(); }