예제 #1
0
    void Update()
    {
        Vector3 screenPos = Camera.main.WorldToScreenPoint(map.renderViewport.transform.position);
        Vector3 mapPos;

        if (map.GetLocalHitFromScreenPos(screenPos, out mapPos))
        {
            int d = map.GetCountryIndex(mapPos);
            if (d != c)
            {
                c = d;
                if (c >= 0)
                {
                    Debug.Log("Country at center of viewport: " + map.countries [c].name);
                }
            }
        }
    }