Project

class Varwin.Project

Bases: object

Provides the ability to control the state of logic.

static RestartScene() None

Restarts the current scene.

Example:

Varwin.Project.RestartScene()
static LoadSceneByGuid(guid: str) None

Loads the scene with the specified identifier.

Example:

Varwin.Project.LoadSceneByGuid("text")
static LoadSceneByName(name: str) None

Loads the scene with the specified name.

Example:

Varwin.Project.LoadSceneByName("text")
static LoadConfigurationByGuid(guid: str) None

Loads the configuration with the specified identifier.

Example:

Varwin.Project.LoadConfigurationByGuid("text")
static LoadConfigurationByName(name: str) None

Loads the configuration with the specified name.

Example:

Varwin.Project.LoadConfigurationByName("text")
static AddPlatformChangedToVRHandler(handler: Callable[[], CoroutineType]) None

Adds a handler function to be called when the platform changes to VR.

Parameters:

handler – Asynchronous handler function

Example:

async def OnPlatformChangedToVR():
  ...
Varwin.Project.AddPlatformChangedToVRHandler(OnPlatformChangedToVR)
static AddPlatformChangedToARHandler(handler: Callable[[], CoroutineType]) None

Adds a handler function to be called when the platform changes to AR.

Parameters:

handler – Asynchronous handler function

Example:

async def OnPlatformChangedToAR():
  ...
Varwin.Project.AddPlatformChangedToARHandler(OnPlatformChangedToAR)
static AddPlatformChangedToDesktopHandler(handler: Callable[[], CoroutineType]) None

Adds a handler function to be called when the platform changes to desktop.

Parameters:

handler – Asynchronous handler function

Example:

async def OnPlatformChangedToDesktop():
  ...
Varwin.Project.AddPlatformChangedToDesktopHandler(OnPlatformChangedToDesktop)
static AddPlatformChangedToNettleDeskHandler(handler: Callable[[], CoroutineType]) None

Adds a handler function to be called when the platform changes to NettleDesk.

Parameters:

handler – Asynchronous handler function

Example:

async def OnPlatformChangedToNettleDesk():
  ...
Varwin.Project.AddPlatformChangedToNettleDeskHandler(OnPlatformChangedToNettleDesk)
static AddPrepareSceneHandler(handler: Callable[[], CoroutineType]) None

Adds a handler function to be called during scene preparation.

Parameters:

handler – Asynchronous handler function

Example:

async def OnPrepareScene():
  ...
Varwin.Project.AddPrepareSceneHandler(OnPrepareScene)