Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Bug Rule Tile Collider not working properly

Discussion in '2D' started by Atnaize, Jan 3, 2023.

  1. Atnaize

    Atnaize

    Joined:
    Dec 15, 2022
    Posts:
    3
    Hello,

    I'm using rule tile to generate a map
    Everything is working great except the collider for the central tile.
    I don't want any collider for the full brown tile. (see wrong_collider.png)

    In my rule tile I explicitly said to not use collider for this specific tile (see rule_tile.png)

    Did I do something wrong or is it a bug ?
     

    Attached Files:

  2. MaxwellTan

    MaxwellTan

    Unity Technologies

    Joined:
    Mar 3, 2022
    Posts:
    74
    Hi Atnaize, thank for the info, are you able to provide a sample of the project for investigation?
     
  3. Atnaize

    Atnaize

    Joined:
    Dec 15, 2022
    Posts:
    3
    Here is few exports.

    In TestScene.unitypackage you will find the ruled tile which is problematic under
    Assets/Artworks/Tiles/Ruled/Ground.asset


    I also exported the whole scene (WholeScene.unitypackage) so you can have the scenes, background, tiles map ...

    Tell me if you need something else :)
     

    Attached Files:

  4. MaxwellTan

    MaxwellTan

    Unity Technologies

    Joined:
    Mar 3, 2022
    Posts:
    74
    Hi Atnaize, thank for the info. May I know which unity version are you using?
     
  5. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    Hi, you are getting the Full Brown Tile because it does not match any of the Rules you have set and is displaying the Default Sprite/Collider option.

    The Rule you have set currently for the Full Brown Tile will only match if all orthogonal sides have the same RuleTile and none of the diagonals have that same RuleTile.

    What you likely want instead is:
    upload_2023-1-5_10-3-33.png
     
    MaxwellTan and MelvMay like this.
  6. Atnaize

    Atnaize

    Joined:
    Dec 15, 2022
    Posts:
    3
    You are right !
    I was not aware that default sprite could be used as such. I thought it was only a template for creating new rules.
    Sorry for the false bug alert

    Everything is working fine now, thanks again !