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

Question Default Rule Tile Sprite overtaking specific use cases

Discussion in '2D' started by Poaked, Oct 24, 2022.

  1. Poaked

    Poaked

    Joined:
    Oct 24, 2022
    Posts:
    3
    Hello, and thanks for taking the time to look at this post!
    I'm currently running through a Game Dev course online, and I've run into a weird hiccup!
    You see, my Rule Tiles work well, except the Default Tile is being used for corner pieces, even though I have a tile that should be obeying that rule.
    For reference, the "fully surrounded" tile is my current default sprite.
    upload_2022-10-23_19-57-23.png
    upload_2022-10-23_19-57-37.png
    upload_2022-10-23_19-57-51.png
    This seems to be more of a placement issue, as I've had multiple cases where it'll simply cover a tile right at the edge, getting as close to the corner as possible.
    upload_2022-10-23_19-58-34.png
    This is the case for the two tile sets that I'm currently working with.
    The Default Sprite also has a rule: Not This in all directions.

    Changing the default sprite just changes which sprite image covers the corners in these use cases.

    Where should I begin looking? Is this some default logic that may have been broken and might need patching? Or is it more likely that a rule somewhere is making the set confused?

    Thanks!
     

    Attached Files:

  2. DanielTanBK

    DanielTanBK

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    80
    Hello, its hard to tell from your screenshots what the issue is
    Could you send a screenshot of the whole list of rules in your Rule Tile?

    Do also refer to the Rule Tile documentation for more info.
    Rules can be set to rotated to account for each corner or side to reduce complexity of the list
    opera_VllpDhTVCH.png

    Also do note to set the most common Rule at the top of the list of Rules and follow with next most common Rule and so on. When matching Rules during the placement of the Tile, the Rule Tile algorithm will check the first Rule first, before proceeding with the next Rules. This could mess with the set if the order is not configured correctly
     
  3. Poaked

    Poaked

    Joined:
    Oct 24, 2022
    Posts:
    3
    Hi! Thanks for taking the time.
    My unity version is 2021.3.5f1, in case that matters.
    I'll set up my rules correctly after taking the screenshots in case it's as simple as that. Though, Not This x8 is fairly far down.
    upload_2022-10-25_2-7-9.png
    upload_2022-10-25_2-8-40.png
    upload_2022-10-25_2-9-8.png
    If it is helpful, below is a visualization of what happens when I change the Default Sprite on a small tileset.
    upload_2022-10-25_2-29-13.png
    It is for this reason why I believe this is more of an issue with how my Unity is handling the Default sprite, rather than how my rules are.
    (P.S. Unfortunately, after cutting down on my number of rules and adjusting the order of said rules, the default tile still overrode the other sprites like this. Could this be an issue with the script itself? I don't think I messed with the script, but at this point I'm worried it must be.)
    Thanks once again!
     
    Last edited: Oct 25, 2022
  4. Poaked

    Poaked

    Joined:
    Oct 24, 2022
    Posts:
    3
    Whoops! Figured it out. I was using too many "This" and "Not This" descriptors. Thank you for your time!
     
    DanielTanBK likes this.