Bonfire Best Practices
Last updated
Last updated
Behavior nodes have a 1:1 relationship with their associated inputs/outputs within the behavior tree. Cause nodes should adhere to the Single Responsibility Principle, a vital part of the SOLID object-oriented design practices. If done correctly, the Cause node will be individually responsible for solely evaluating specific conditions. Similarly, using this principle with effect nodes means each node executes a single action.
Coupling between nodes in code can lead to brittle behavior. Nodes should only communicate through input and output sockets; they should not depend on each other in code. This allows for easy modification and extension of the behavior tree without affecting other system parts, thereby conforming to the Open/Closed Principle.
Behavior nodes cannot be Unity MonoBehaviors. They are Plain Old C# Objects (POCO). This practice of using POCOs creates a more structured application architecture that makes nodes platform-agnostic, performant, reusable, easier to control, and easier to troubleshoot. While MonoBehaviors are tightly coupled with Unity's lifecycle and primarily used for GameObject components, behavior tree nodes operate independently of Unity's GameObject architecture. To leverage Unity's lifecycle events, the SparkSDK offers the Lifecycle class.
When adding an "Interacted" or "Grabbed" Behavior Node to a Spark, ensure that the "Is Interactable" trait is checked. It is common for new creators to overlook this step, leading to confusion about the inability to grab or interact with Sparks.
When configuring UI buttons, make sure the Sort Order of the button is set higher than other UI elements within the same container (such as a Billboard or Screen Space UI) if symbols or elements overlap the button, as shown in the image. This ensures the button stays on the top layer, making it clickable and fully functional.
If no other UI elements overlap the button (like in the image below), having the same Sort Order is fine and should work as expected.
If a downloaded asset doesn’t appear immediately, try clicking the breadcrumb labeled "Spark" at the top of the interface to ensure the asset is properly loaded.
Always monitor the Utilization Bar in the Bonfire Builder and ensure it does not exceed 200%. Exceeding this limit can cause performance issues and lead to lag within your Book.
To quickly navigate back to the main folder while in a sub-folder within the Spark Browser, simply click the breadcrumb labeled "Spark" at the top of the interface. This will immediately take you back to the main Spark directory, saving time and making navigation smoother.
In the Behavior Window and Chapter Window, use the "Zoom to Fit Selected" button to fill the screen with the specific behavior nodes or chapters in view. This button automatically adjusts the view to right size and center on the selected item, making it easier to find and edit nodes or chapters in complex layouts.
You can customize your window layout in the Bonfire Builder to suit your workflow preferences. Adjusting the layout can help you manage your workspace more efficiently when creating or editing Books.
In the Settings window of Bonfire Builder, you can easily reset, save, and open your saved layout configurations. This feature allows you to customize your workspace and maintain your preferred setup across sessions.
In the Chapter Window, Behavior Window, Spark Browser, Map Browser, Config Window, Entities Window, and Symbols Window, you can use the search bar to quickly locate or modify specific Sparks.
If you find a bug or want to request a new feature in Bonfire Builder, click the "Report a Bug" button.
To make your report clear:
Be Specific: Describe exactly what happened or what you want.
Test Before Reporting: Make sure the bug happens more than once.
Provide Details:
Steps to Reproduce: List what you did before the bug appeared.
Screenshots or Videos: Include visuals if possible.
System Info: Add your device and Bonfire version.
This helps the team understand and fix issues faster!