Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattatz/unity-procedural-tree
Procedural tree builder for Unity
https://github.com/mattatz/unity-procedural-tree
Last synced: about 1 month ago
JSON representation
Procedural tree builder for Unity
- Host: GitHub
- URL: https://github.com/mattatz/unity-procedural-tree
- Owner: mattatz
- License: mit
- Created: 2015-01-02T04:01:50.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-16T15:50:14.000Z (over 1 year ago)
- Last Synced: 2024-02-07T08:17:21.067Z (4 months ago)
- Language: C#
- Homepage:
- Size: 21.4 MB
- Stars: 392
- Watchers: 25
- Forks: 40
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - unity-procedural-tree
- awesome-unity-open-source-on-github - unity-procedural-tree - Procedural tree builder (Generator)
- anything_about_game - unity-procedural-tree
- awesome-unity3d - unity-procedural-tree - Procedural tree builder for Unity. (Open Source Repositories / Procedural Generation Systems)
- awesome-opensource-unity - unity-procedural-tree - Procedural tree builder for Unity. (Open Source Packages / Procedural Generation Systems)
- awesome - mattatz/unity-procedural-tree - Procedural tree builder for Unity (C\#)
README
unity-procedural-tree
=====================Procedural tree builder for Unity.
![Demo](https://raw.githubusercontent.com/mattatz/unity-procedural-tree/master/Captures/Demo.gif)
## Usage
TreeData class has properties of ProceduralTree.
![TreeData](https://raw.githubusercontent.com/mattatz/unity-procedural-tree/master/Captures/TreeData.png)
Setup a TreeData instance and pass it to ProceduralTree.Build function.
```cs
// Setup TreeData for properties of ProceduralTree
TreeData data = new TreeData();
// data.randomSeed = 100;
// data.branchesMin = 1; data.branchesMax = 3;Mesh mesh = ProceduralTree.Build(
data,
6, // generations of a tree
1.5f, // base height of a tree
0.15f // base radius of a tree
);
```