Click or drag to resize

Conditional Compilation

[This is preliminary documentation and is subject to change.]

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.

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)

CONTRACTS_FULL; UNITY_EDITOR; 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; LOG_MESSAGING

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

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

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