Initialization

Fabric and all installed kits need to be initialized when a Unity generated application runs on a device.

For the vast majority of users, initializing Fabric as early as possible is optimal because it provides the largest application life-cycle coverage. Kits, such as Crashlytics, take advantage of the most broad coverage to capture crashes that might occur early in the start of your application.

By default, Fabric for Unity is automatically initialized in your project as early as possible.

For some apps, it is important to delay initialization until a user has taken certain actions. For example, agreeing to a Terms of Service. This can be accomplished by manually enabling Fabric as described below.

Enable Manual Initialization

Enabling “Manual” initialization is a two step process:

  1. Navigate to the “Initialization Page” via the Fabric -> Advanced -> Manual Initialization... menu item. Please note, that you cannot access this screen while in the middle of another action with the plugin, such as installing a kit.
  2. Select “Manual”, copy the code snippet to the most appropriate place in your code, and press Apply.
../_images/unity-manual-initialization.png

If you later decide to use “Automatic” initialization, the Fabric.Runtime.Fabric.Initialize(); statement will be ignored in your code - Fabric will automatically initialize as early as possible.