2d-extras
2d-extras copied to clipboard
What Rule Override does and how to use it for slopes if possible?
I've tried to find it here and on google but didn't manage to find a tutorial explaining what it does exactly and how to use.
Also I'm trying to find a way to add slopes only when I need it but also want it to merge with my Rule Tile set.
I added an example in the 2d-techdemos repository in the package branch (requires Git to be installed). You can open the Assets/Tilemap/Rule Tiles/Rule Override Tile/Rule Override Tile.unity scene to check it out.
Here are some steps on how do it:
- Create the Rule Tile
- Create the Rule Override Tile for slopes, setting the above Rule Tile as the Tile to override
- Replace the Sprites which you want overridden (I changed the corner Sprite to a slop).
Let us know if that works for you!
I manage to understand now, thank you so much for your help.
Great work! \o/
Thank you for providing an example! I was wanting to see the example in action too. However, I ran into different errors on my blindly trying to get this to work. Example error: "Library\PackageCache\com.unity.2d.tilemap.extras@ef782d4433b8dbd9c4bfa1e4e2a0812f6400eecf\Editor\Brushes\CoordinateBrush\CoordinateBrush.cs(9,36): error CS0246: The type or namespace name 'GridBrush' could not be found (are you missing a using directive or an assembly reference?)"
So for others that stumble upon this:
- You must install a command-line git (https://git-scm.com) since the manifest.json is loading in the dependent 2d-extras. (ChuanXin-Unity mentioned)
- Starting from a brand new project was easier to ensure you get the correct manifest.json projects loaded. I used Unity 2019.2 version. Also used the code branch: "package_2019.2".
- The 'requirements' and 'setup' aren't found in the 2d-techdemos repository, but instead in the 2d-extras: https://github.com/Unity-Technologies/2d-extras/blob/package_2019.2/README.md (@ChuanXin-Unity might fix this later).