I'm really confused. Is it possible to use trees like binary trees or data structures in Unity?

I need to introduce artificial intelligence into my game, and use the A* algorithm.

  • 6
    \$\begingroup\$ Absolutely not. Unity performs occasional checks and if trees are found in your source code, all of your code gets confiscated. On a more serious note: Why do you seem to believe that it's not possible? \$\endgroup\$
    – Tyyppi_77
    Apr 2 '17 at 18:51
  • \$\begingroup\$ @Tyyppi_77 what are you talking about ? did you check DMGregory answer??? \$\endgroup\$ Apr 5 '17 at 5:04

Sure it's possible to use trees! Just to name a few, we use...

As Tyyppi_77 notes in a comment above, it's hard to imagine a useful programming system in which it's not possible to use trees. Have you encountered any difficulty implementing a particular tree-based algorithm that you're looking for help with?

  • \$\begingroup\$ thnx a lot ! actually I'll make a game like the 'dots and boxes' one .. but I still collecting informations and ideas before starting. \$\endgroup\$
    – Jihen007
    Apr 2 '17 at 19:59
  • \$\begingroup\$ hi @DMGregory did you check the Tyyppi_77 comments i am absolutely surprised \$\endgroup\$ Apr 5 '17 at 5:03
  • \$\begingroup\$ @MohammadFaizanKhan You did catch Tyyppi_77's sarcasm, yes? Or are you just joking around as well? ;) \$\endgroup\$
    – DMGregory
    Apr 5 '17 at 12:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.