Download this documentation page as a PDF.

Contents

Conditional Compilation

Conditional compilation can be used to conditionally include or exclude portions of a source file. In the case of Pure Pool, it can enable or disable specific features. You may wish to disable features that you don't use, especially for your final release builds, to ensure maximum performance.

Built Assemblies

Pure Pool is shipped with binaries built with the three different solution configurations: Debug, Debug (Editor), and Release. By default, the binaries that are installed are those from the Debug (Editor) solution configuration. The other binaries are stored in the Pure Pool Binaries.zip file within the Plugins\Umbrace.Unity.PurePool\Binaries folder, and can be extracted to your Unity Assets folder as required.

It's important to remember that Unity uses meta files (.meta file extension) to maintain the link between the components in your scene's GameObjects or prefabs, and the DLL library where the component is defined. When you change the Pure Pool binaries for a different solution configuration, always ensure you keep the meta file intact. If the meta file is deleted or overwritten, you may lose the connection between the components and the library, which results in "Missing script" errors.

If you encounter the "Missing script" errors, please look at our meta files page for steps to fix the problem.

Symbols

The following list shows the symbols that can be defined when building the solution, and their meaning.

CONTRACTS_FULL

Includes contract pre-condition checking. This helps you to know when you're passing incorrect arguments to a method.

UNITY_EDITOR

Includes more specific warning messages about incorrect usages, and other Editor-specific conveniences. Any projects built using this symbol can only be used in the Unity Editor, and not in a standalone/player build.

POOL_STATISTICS

Records general operational statistics about the pools at runtime.

LOG_MESSAGING

Includes log messaging in the built assemblies.

These symbols can be defined or undefined to control which features and functionality are present in the build output.

Defined Symbols

Pure Pool is distributed with several binaries, which have each been built with different symbols defined. The table below shows which symbols were defined for each build.

Defined Symbols in Builds

Solution Configuration

Defined Symbols

Explanation

Debug

CONTRACTS_FULL
POOL_STATISTICS
LOG_MESSAGING

The Debug configuration defines CONTRACTS_FULL to include full contract pre-condition checking.

It also defines POOL_STATISTICS to record general operational statistics about the pools at runtime.

It defines LOG_MESSAGING to include log messaging in the built assemblies.

This configuration is most suited to testing your game outside of the Unity Editor, in one of the available players.

Debug (Editor)

UNITY_EDITOR
CONTRACTS_FULL
POOL_STATISTICS
LOG_MESSAGING

The Debug (Editor) configuration defines CONTRACTS_FULL to include full contract pre-condition checking.

It defines UNITY_EDITOR to allow more specific warning messages about incorrect usages.

It also defines POOL_STATISTICS to record general operational statistics about the pools at runtime.

In addition to these, it defines LOG_MESSAGING to include log messaging in the built assemblies.

This configuration is most suited to testing your game inside of the Unity Editor. It will not work under any of the available players.

Release

POOL_STATISTICS

The Release configuration defines POOL_STATISTICS to record general operational statistics about the pools at runtime.

This configuration is most suited to releasing your game, and building for one of the available players.