private void Start() { rwt = GetComponent <RealWorldTerrainContainer>(); if (rwt == null) { Debug.LogError("Real World Terrain Connector should be together c Real World Terrain Container."); OnlineMapsUtils.Destroy(this); return; } if (positionMode == PositionMode.transform && targetTransform == null) { Debug.LogError("Target Transform is not specified."); OnlineMapsUtils.Destroy(this); return; } map = OnlineMaps.instance; if (mode == Mode.centerOnPosition) { map.position = currentPosition; } else if (mode == Mode.markerOnPosition) { marker = map.AddMarker(currentPosition, markerTexture, markerLabel); } }
private void Start() { rwt = GetComponent<RealWorldTerrainContainer>(); if (rwt == null) { Debug.LogError("Real World Terrain Connector should be together c Real World Terrain Container."); DestroyImmediate(this); return; } if (positionMode == OnlineMapsRWTConnectorPositionMode.transform && targetTransform == null) { Debug.LogError("Target Transform is not specified."); DestroyImmediate(this); return; } api = OnlineMaps.instance; if (mode == OnlineMapsRWTConnectorMode.centerOnPosition) { api.position = currentPosition; } else if (mode == OnlineMapsRWTConnectorMode.markerOnPosition) { marker = api.AddMarker(currentPosition, markerTexture, markerLabel); } }