Skip to content

Commit

Permalink
docs: explained how to disable formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ashblue authored Jan 24, 2024
1 parent f1de0c7 commit 7c9b09b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ with units who attempt to capture the flag while grabbing power ups to try and g
+ [Custom Conditions](#custom-conditions)
+ [Custom Composites](#custom-composites)
+ [Custom Decorators](#custom-decorators)
* [Formatting Issues](#formatting-issues)
* [Nightly Builds](#nightly-builds)
* [Development Environment](#development-environment)
+ [Submitting your own actions, conditions, ect](#making-commits)
Expand Down Expand Up @@ -675,6 +676,25 @@ public static class BehaviorTreeBuilderExtensions {
}
```

## Formatting Issues

If you are using an auto formatter it will probably mangle your code formatting with the builder syntax. To avoid this you can turn off formatting like so in JetBrains Rider. If you need a specific IDE, it shouldn't be too hard to google the specific formatting disable comment you need.

```c#
// @formatter:off
_tree = new BehaviorTreeBuilder(gameObject)
.Sequence()
.Condition("Custom Condition", () => {
return true;
})
.Do("Custom Action", () => {
return TaskStatus.Success;
})
.End()
.Build();
// @formatter:on
```

## Nightly Builds

To access nightly builds of `develop` that are package manager friendly you'll need to manually edit your `Packages/manifest.json` as so.
Expand Down

0 comments on commit 7c9b09b

Please sign in to comment.