Author Topic: Grid System  (Read 67 times)

notwithoutyou

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Grid System
« on: March 26, 2020, 11:07:12 AM »
Hello , there is a way for find cellIndex if i have City name ?

More details;  grid system is enable .. i have a city(or capital) name and i want to find which cell contains this city .. Greetings and thanks ..

For example Paris ..  Which cell contains to paris ?

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5523
    • View Profile
Re: Grid System
« Reply #1 on: March 26, 2020, 11:19:17 AM »
Use:

Code
GetCellIndex(position)

And pass the position of the city.

notwithoutyou

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Grid System
« Reply #2 on: March 26, 2020, 11:44:58 AM »
Forgive me sir but;

City city ;

there is no city.positon . There are have only city.unity2dlocation and its not work for this ..

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5523
    • View Profile
Re: Grid System
« Reply #3 on: March 26, 2020, 12:10:34 PM »
Yes, use unity2Dlocation.

notwithoutyou

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: Grid System
« Reply #4 on: March 26, 2020, 12:18:53 PM »
 :D :D  THANKS Sir