Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How is overhead of OnTrigger function series?

Discussion in 'Scripting' started by leegod, Oct 13, 2015.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,472
    So I will have about 100 of 2d sprites in my 2d game,

    and will implement adjacent judgement function of each tile's 4 directions (up, down, left, right)

    So for this, if I use OnTriggerStay, to check each adjacent tile's 4 directions box collider2d is overlapped with each other,

    how is performance overhead for mobile device?

    Should I use other way of not using collider2d and OnTriggerStay function?

    Thanks.