Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

PlayerSettings.forceSingleInstance

static var forceSingleInstance: bool;
static bool forceSingleInstance;
static forceSingleInstance as bool

Description

Restrict standalone players to a single concurrent running instance.

This detects at startup whether another instance of the same player is already running, and aborts with an error message if so.