Branchmaker <3 Unity

Unity Integration

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.

  1. Adding the UPM Package from Git URL:
    1. Open your Unity project.
    2. Go to the Unity Editor menu and select "Window" > "Package Manager."
    3. In the Package Manager window, click on the "+" button in the top-left corner and choose "Add package from git URL."
    4. In the input field that appears, enter the Git URL of the Branchmaker UPM package.
    5. Press Enter or click on the "Add" button.
    6. Unity will fetch the package from the provided Git URL and import it into your project, making its functionalities accessible.
  2. Obtaining Story Key and Secret Token:
    1. Visit the Branchmaker website (provide the URL) and log in to your account.
    2. Once logged in, navigate to the section where you can manage your stories.
    3. Select the desired story you want to connect with Unity.
    4. 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.
    5. Copy the Story Key and Secret Token, as you'll need them in the next steps.
  3. Integrating Branchmaker into Unity:
    1. In your Unity project, locate the script or component where you want to access the Branchmaker story.
    2. Import the necessary namespaces or include the required scripts to enable communication with Branchmaker.
    3. 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.
    4. Use the provided methods and functions in the Branchmaker SDK to interact with the story, nodes, blocks, and options.
    5. Refer to the included samples and documentation in the imported UPM package for guidance on how to utilize the Branchmaker SDK effectively.
    6. 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.