I'm working on a unity project and I'm looking to show the range of a certain character.

enter image description here

However, the terrain is generated through a script at run time, and considering that the script uses the same prefab for each tile, any modification made to one prefab affects the others as well.

Hence, I'm looking for a method in which I can independently tweak the settings of each prefab. The unit in question is to shoot a ray-cast to determine which tile it is on, and a script would then modify the colour of the neighboring tiles so as to determine the range of the unit.

Any advice on how to achieve this will be highly appreciated.

  • \$\begingroup\$ I think (ie. not able to confirm this right now) you just need to adjust properties of the instantiated copies and not the original prefab. \$\endgroup\$ – jhocking Oct 11 '14 at 18:18
  • \$\begingroup\$ Possible duplicate: gamedev.stackexchange.com/questions/83526/… \$\endgroup\$ – MichaelHouse Oct 11 '14 at 18:30
  • \$\begingroup\$ Cannot find anything related to "path-finding". Maybe the tag should be removed. \$\endgroup\$ – SDwarfs Oct 13 '14 at 21:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.