Skip to main content

Best Practices

Summary

This document provides a few pointers on how to get the most out of the Reactional Plugin in Unity. It is not a complete guide but rather a collection of tips and tricks.

Summary

Version Support

  • Unity 6
  • Unity 2022 LTS
  • Unity 2021 LTS
  • Unity 2020 LTS

Considerations

When working in Unity, the Reactional API is made to be easy to use and prototype with. Depending on the size of your project and the complexity of the logic, consider this:

Simple Logic, A Player Prefab or just a Few Reactional dependent Objects in the Scene

When using Reactional API to react on gameplay, whether the thing reacting is a Player Prefab, or a Few Object Instances in the Scene, and / or if they are dependent on simple conditions, you can drive your logic locally in any Prefab without significant impact on performance.

Big projects, lots of Objects and complex logic

When using the Reactional API to drive complex behaviors of the gameplay, or using the same logic on multiple actors in a Scene, consider the consistency, scalability, and maintainability aspects. Centralizing Reactional logic into a manager could help to manage your performance costs.

Using a central ReactionalManager script on a single gameObject converted to a Prefab in the Hierarchy to handle logic calculations reduces computational overhead. For instance, rather than having each GameObject handle its own logic in complex scenes with many GameObjects or frequently duplicated objects, like pickups or other scene elements that are dependent on the Reactional API. Centralizing these calculations ensures they are computed only once, which optimizes performance.

Other Tips

  • Heavy functions as LoadBundle should in most cases be called in Async mode.

  • Use Object.DontDestroyOnLoad if you don't want to lose your Reactional Manager script values between scenes.

Build Support

  • Win64
  • macOS Intel
  • macOS arm64
  • Linux
  • iOS
  • Android

Check out the Build Settings for more information

// Add Later, Under Summary and Under Build Support

Reactional Integration

  • Wwise:
  • Fmod:

Benchmark

A loaded theme and song bundle with 20 songs and one theme currently sits around "..." (Give some smal information about benchmark)