# 2d-extras
2d-extras is a repository containing helpful reusable scripts which you can use to make your games, with a slant towards 2D. Feel free to customise the behavior of the scripts to create new tools for your use case!
Implemented examples using these scripts can be found in the sister repository [2d-techdemos](https://github.com/Unity-Technologies/2d-techdemos "2d-techdemos: Examples for 2d features").
All items in the repository are grouped by use for a feature and are listed below.
## How to use this
You can use this in two different ways: downloading this repository or adding it to your project's Package Manager manifest.
Alternatively, you can pick and choose the scripts that you want by placing only these scripts in your project's `Assets` folder.
### Download
#### Setup
Download or clone this repository into your project in the folder `Packages/com.unity.2d.tilemap.extras`.
### Package Manager Manifest
#### Requirements
[Git](https://git-scm.com/) must be installed and added to your path.
#### Setup
The following line needs to be added to your `Packages/manifest.json` file in your Unity Project under the `dependencies` section:
```json
"com.unity.2d.tilemap.extras": "https://github.com/Unity-Technologies/2d-extras.git#master"
```
### Tilemap
For use with Unity `2019.2.0f1` onwards.
Please use the `2019.1` tag for Unity 2019.1 versions.
Please use the `2018.3` branch or the `2018.3` tag for Unity 2018.3 versions.
Please use the `2018.2` branch or the `2018.2` tag for Unity 2018.2 versions.
Please use the `2017` branch or the `2017` tag for earlier versions of Unity (from 2017.2 and up).
##### Brushes
- **Coordinate**: This Brush displays the cell coordinates it is targeting in the SceneView. Use this as an example to create brushes which have extra visualization features when painting onto a Tilemap.
- **Line**: This Brush helps draw lines of Tiles onto a Tilemap. The first click of the mouse sets the starting point of the line and the second click sets the ending point of the line and draws the lines of Tiles. Use this as an example to modify brush painting behaviour to making painting quicker with less actions.
- **Random**: This Brush helps to place random Tiles onto a Tilemap. Use this as an example to create brushes which store specific data per brush and to make brushes which randomize behaviour.
- **Prefab**: This Brush instances and places the containing Prefab onto the targeted location and parents the instanced object to the paint target. Use this as an example to quickly place an assorted type of GameObjects onto structured locations.
- **PrefabRandom**: This Brush instances and places a randomly selected Prefabs onto the targeted location and parents the instanced object to the paint target. Use this as an example to quickly place an assorted type of GameObjects onto structured locations.
- **GameObject**: This Brush instances, places and manipulates GameObjects onto the scene. Use this as an example to create brushes which targets objects other than tiles for manipulation.
- **TintBrush**: Brush to edit Tilemap per-cell tint colors.
- **TintBrushSmooth**: Advanced tint brush for interpolated tint color per-cell. Requires the use of custom shader (see TintedTilemap.shader) and helper component TileTextureGenerator.
- **Group**: This Brush helps to pick Tiles which are grouped together by position. Gaps can be set to identify if Tiles belong to a Group. Limits can be set to ensure that an over-sized Group will not be picked. Use this as an example to create brushes that have the ability to choose and pick whichever Tiles it is interested in.
##### Tiles
- **Animated**: Animated Tiles are tiles which run through and display a list of sprites in sequence.
- **Pipeline**: Pipeline Tiles are tiles which take into consideration its orthogonal neighboring tiles and displays a sprite depending on whether the neighboring tile is the same tile.
- **Random**: Random Tiles are tiles which pseudo-randomly pick a sprite from a given list of sprites and a target location, and displays that sprite.
- **Terrain**: Terrain Tiles, similar to Pipeline Tiles, are tiles which take into consideration its orthogonal and diagonal neighboring tiles and displays a sprite depending on whether the neighboring tile is the same tile.
- **RuleTile**: Generic visual tile for creating different tilesets like terrain, pipeline, random or animated tiles.
- **Hexagonal Rule Tile**: A Rule Tile for use with Hexagonal Grids. Enable Flat Top for Flat Top Hexagonal Grids and disable for Pointed Top Hexagonal Grids.
- **Isometric Rule Tile**: A Rule Tile for use with Isometric Grids.
- **RuleOverrideTile**: Rule Override Tiles are Tiles which can override a subset of Rules for a given Rule Tile to provide specialised behaviour while keeping most of the Rules originally set in the Rule Tile.
- **Weighted Random**: Weighted Random Tiles are tiles which randomly pick a sprite from a given list of sprites and a target location, and displays that sprite. The sprites can be weighted with a value to change its probability of appearing.
##### Other
- **GridInformation**: A simple MonoBehaviour that stores and provides information based on Grid positions and keywords.
- **Custom Rules for RuleTile**: This helps to create new custom Rules for the Rule Tile. Check the [Wiki](https://github.com/Unity-Technologies/2d-extras/wiki) for more information on how to use this.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
unity的tilemap辅助工具,自带多种笔刷 (175个子文件)
Unity.2D.Tilemap.Extras.EditorTests.asmdef 519B
Unity.2D.Tilemap.Extras.Editor.asmdef 464B
Unity.2D.Tilemap.Extras.asmdef 42B
RuleTileEditor.cs 33KB
RuleTile.cs 30KB
GameObjectBrush.cs 29KB
GridInformation.cs 21KB
RandomBrush.cs 12KB
RuleOverrideTile.cs 12KB
RuleOverrideTileEditor.cs 12KB
LineBrush.cs 10KB
TerrainTile.cs 9KB
GroupBrush.cs 8KB
HexagonalRuleTileEditor.cs 7KB
HexagonalRuleTile.cs 7KB
AnimatedTile.cs 6KB
AdvancedRuleOverrideTileEditor.cs 6KB
TintBrushSmooth.cs 6KB
PrefabRandomBrush.cs 6KB
PipelineTile.cs 6KB
AdvancedRuleOverrideTile.cs 5KB
PrefabBrush.cs 5KB
WeightedRandomTile.cs 5KB
IsometricRuleTileEditor.cs 4KB
PopulateRuleOverrideTileWizard.cs 4KB
TintTextureGenerator.cs 4KB
TintBrush.cs 4KB
RandomTile.cs 3KB
BasePrefabBrush.cs 2KB
CoordinateBrush.cs 2KB
IsometricRuleTile.cs 1KB
CustomRuleTileMenu.cs 403B
PlaceholderTests.cs 197B
.gitignore 457B
package.json 581B
RuleTile.md 6KB
README.md 5KB
index.md 5KB
CHANGELOG.md 4KB
CustomRulesForRuleTile.md 3KB
TerrainTile.md 3KB
RandomBrush.md 2KB
RuleOverrideTile.md 2KB
GridInformation.md 2KB
TintBrushSmooth.md 2KB
PrefabBrush.md 2KB
LineBrush.md 2KB
WeightedRandomTile.md 2KB
GameObjectBrush.md 1KB
AnimatedTile.md 1KB
Third Party Notices.md 1KB
GroupBrush.md 1KB
PipelineTile.md 1KB
RandomTile.md 1KB
Contributors.md 1KB
TableOfContents.md 813B
Tiles.md 803B
Brushes.md 783B
TintBrush.md 729B
QAReport.md 686B
LICENSE.md 487B
CONTRIBUTING.md 483B
CoordinateBrush.md 445B
Other.md 108B
GridInformation.cs.meta 285B
RuleTile.cs.meta 284B
TintTextureGenerator.cs.meta 284B
RuleTileEditor.cs.meta 284B
RandomBrush.cs.meta 284B
GameObjectBrush.cs.meta 284B
PrefabRandomBrush.cs.meta 284B
PrefabBrush.cs.meta 284B
TintBrush.cs.meta 284B
CoordinateBrush.cs.meta 284B
TintBrushSmooth.cs.meta 284B
AnimatedTile.cs.meta 262B
RandomTile.cs.meta 262B
TerrainTile.cs.meta 262B
PipelineTile.cs.meta 262B
WeightedRandomTile.cs.meta 243B
HexagonalRuleTile.cs.meta 243B
IsometricRuleTile.cs.meta 243B
RuleOverrideTile.cs.meta 243B
AdvancedRuleOverrideTile.cs.meta 243B
HexagonalRuleTileEditor.cs.meta 243B
IsometricRuleTileEditor.cs.meta 243B
RuleOverrideTileEditor.cs.meta 243B
PopulateRuleOverrideTileWizard.cs.meta 243B
AdvancedRuleOverrideTileEditor.cs.meta 243B
CustomRuleTileMenu.cs.meta 243B
LineBrush.cs.meta 243B
GroupBrush.cs.meta 243B
PlaceholderTests.cs.meta 243B
TintedTilemap.shader.meta 217B
RuleTile.meta 172B
PipelineTile.meta 172B
RandomTile.meta 172B
AnimatedTile.meta 172B
WeightedRandomTile.meta 172B
TerrainTile.meta 172B
共 175 条
- 1
- 2
资源评论
shjte
- 粉丝: 5
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功