A downloadable tool

Buy Now$2.20 USD or more

This Unity script automatically changes your character’s Order in Layer when entering a trigger area — perfect for 2D games with depth or overlap issues.

With this system, your player can seamlessly move in front of or behind tiles, props, or any environment element without manual adjustments.

How it works:

  • Attach the SortingTriggerRelative script to an Empty GameObject with a 2D Collider (set as Is Trigger).
  • Assign the target Tilemap Renderer in the Reference Renderer field.
  • Place the PlayerSortingController script on your player object.
  • When the player enters or exits the trigger, the sorting order will dynamically adjust — moving the character above or below the environment depending on the value you set.

Requirements:

  • Rigidbody2D (Dynamic, Simulated = true)
  • BoxCollider2D or any 2D Collider
  • Tilemap Renderer reference for sorting

This simple yet powerful tool fixes one of the most common visual issues in 2D pixel-art games — depth sorting glitches — with full control and smooth transitions.

Purchase

Buy Now$2.20 USD or more

In order to download this tool you must purchase it at or above the minimum price of $2.20 USD. You will get access to the following files:

Dynamic Player Sorting Layer Change.rar 1.2 kB

Leave a comment

Log in with itch.io to leave a comment.