Branchmaker <3 Unity
Here's a step-by-step guide for Unity developers on how to use Branchmaker within the Unity game engine:
Note: This guide assumes you already have Unity installed on your machine.
Adding the UPM Package from Git URL:
- Open your Unity project.
- Go to the Unity Editor menu and select "Window" > "Package Manager."
- In the Package Manager window, click on the "+" button in the top-left corner and choose "Add package from git URL."
- In the input field that appears, enter the Git URL of the Branchmaker UPM package.
- Press Enter or click on the "Add" button.
- Unity will fetch the package from the provided Git URL and import it into your project, making its functionalities accessible.
Obtaining Story Key and Secret Token:
- Visit the Branchmaker website (provide the URL) and log in to your account.
- Once logged in, navigate to the section where you can manage your stories.
- Select the desired story you want to connect with Unity.
- In the story details or settings page, you will find the Story Key and Secret Token. These are essential credentials required to connect Branchmaker with your Unity project.
- Copy the Story Key and Secret Token, as you'll need them in the next steps.
Integrating Branchmaker into Unity:
- In your Unity project, locate the script or component where you want to access the Branchmaker story.
- Import the necessary namespaces or include the required scripts to enable communication with Branchmaker.
- Create an instance of the Branchmaker SDK using the Story Key and Secret Token you obtained earlier. This will establish the connection between your Unity project and the Branchmaker story.
- Use the provided methods and functions in the Branchmaker SDK to interact with the story, nodes, blocks, and options.
- Refer to the included samples and documentation in the imported UPM package for guidance on how to utilize the Branchmaker SDK effectively.
- Implement the desired functionality based on your game's requirements, such as advancing the story, displaying dialogue, or handling player choices.
By following these steps, Unity developers can seamlessly integrate Branchmaker into their projects, leveraging the provided SDK and samples to create branching narratives and manage dialogue effectively.
Remember to consult the documentation and resources included with the Branchmaker UPM package for detailed information on the available functionalities, best practices, and additional support.