Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TerrainTile combined with WeightedRandom? #319

Open
superfrantv opened this issue Nov 2, 2021 · 3 comments
Open

TerrainTile combined with WeightedRandom? #319

superfrantv opened this issue Nov 2, 2021 · 3 comments

Comments

@superfrantv
Copy link

Hello,

i need some help in scripting.
How can i optimized combine TerrainTile with WeightedRandom, i want a checkBox in the Inspector for the "Filled" Tile so add differend styles bassed on weightedrandom.

Thank you

@ChuanXin-Unity
Copy link
Collaborator

You could check out the link below for an implementation of a Terrain Tile with Weighted Random Sprites, and adjust the Inspector's UX to suit your needs:

https://github.com/Unity-Technologies/2d-extras/blob/weightedrandomterraintile/Runtime/Tiles/TerrainTile/WeightedRandomTerrainTile.cs

@superfrantv
Copy link
Author

Thank you, but i added it and when i reload my project all sprites are deleted in the tile.

@ChuanXin-Unity
Copy link
Collaborator

ChuanXin-Unity commented Nov 5, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants