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: 9 days 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 (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-16T15:50:14.000Z (almost 2 years ago)
- Last Synced: 2024-10-22T16:49:30.687Z (17 days ago)
- Language: C#
- Homepage:
- Size: 21.4 MB
- Stars: 402
- Watchers: 25
- Forks: 40
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - unity-procedural-tree - Procedural tree builder (Generator)
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
);
```