![Logic State Tree](https://assetstorev1-prd-cdn.unity3d.com/key-image/8e9ffe72-ac76-40ab-8fb8-b2ac2595b1f6.jpg)
The logic state tree is a useful utility for scripting in unity. Sometimes it can be a nuisance to convert the flow of your game into scripts. Some things need to happen one after another, some things need to happen at the same time, this needs to deactivate if that happens, but not if this happens. The logic state tree attacks this problem by giving you a set of generic scripts that you can combine in the inspector to create the backbone for your gameflow.
The strength of the logic state tree comes from its simplicity. Instead of trying to implement every feature in unity like a visual scripting extension, the logic state tree provides you with a set of basic features and allows you to easily add your own features to it. In fact: the logic state tree is so simple that you can learn all its features in a day.
What is the problem?
Scripting a flow in your game is a nuisance.
How does this package solve that?
The package gives you generic scripts that you can combine in your inspector to build your flows with ease.
What features does this package contain?
- A collection node with two standard behaviours
- Sequencer behaviour
- Parallel behaviour
- A switch node which activates a branch based on the result of an expression branch
- A loop node which reactivates a branch until it completes with success
- A chance node which completes with failure or success with a given chance
- A timer node which completes after a given amount of seconds
- A teleportation node which teleports the target gameobject to this location
- A collision node which completes when the target gameobject starts colliding with this object
- A trigger node which can be triggered by your own code should you desire to do so
- A root so you can control your logic state tree
- A demo scene to showcase all the above
- All the source code can be read so you can see for yourself how it works and you can change the entire library if you desire!
- Very easy extensibility!
What are example uses for this package?
- you can use this to create a combination lock on your door
- you can make your ai walk from target to target and with a small extension you can make it choose targets randomly
- you can make a waypoint system for your race game
Technical specifications:
- This package has no dependencies
- Scripting runtime version: .NET 4.x
- API compatibility level: .NET Standard 2.0
- No specific target framework