TeslasuitDocumentation
Plugins

Core & bootstrap

Classes#

TsInitializer#

TsInitializer

Uses RuntimeInitializeOnLoadMethod to load the teslasuit native libraries before the editor or built scene will be loaded.

As the teslasuit native libraries directory are not located in Unity project, they are need to be loaded manually. So, TsInitializer will load Teslasuit native libraries. If the Teslasuit SDK is not installed properly, DllNotFoundException will be thrown with a message "Teslasuit api library not found! Please sure that Teslasuit SDK is installed.".

Properties

Handle — IntPtr (read-only)

Methods

Initialize#

void Initialize();

InitSDKInstallation#

string InitSDKInstallation(TsInitializerImpl impl);

Parameters

impl: TsInitializerImpl

Returns: string



TsInitializerImpl#

TsInitializerImpl

Methods

GetAPILibraryPath#

string GetAPILibraryPath();

Returns: string


IsLibraryLoaded#

bool IsLibraryLoaded();

Returns: bool


LoadLibrary#

IntPtr LoadLibrary(string path);

Parameters

path: string

Returns: IntPtr


SetLibrariesDirectory#

bool SetLibrariesDirectory(string path);

Parameters

path: string

Returns: bool


GetLibName#

string GetLibName(string libPath);

Parameters

libPath: string

Returns: string


Get#

TsInitializerImpl Get();


TsInitializerWindows#

TsInitializerWindows

Fields

APIPathKey const string

Methods

GetAPILibraryPath#

override string GetAPILibraryPath();

Returns: override string


IsLibraryLoaded#

override bool IsLibraryLoaded();

Returns: override bool


LoadLibrary#

override IntPtr LoadLibrary(string path);

Parameters

path: string

Returns: override IntPtr


SetLibrariesDirectory#

override bool SetLibrariesDirectory(string path);

Parameters

path: string

Returns: override bool


SetDllDirectoryWin#

bool SetDllDirectoryWin(string lpPathName);

Parameters

lpPathName: string

Returns: bool


LoadLibraryWin#

IntPtr LoadLibraryWin(string lpFileName);

Parameters

lpFileName: string

Returns: IntPtr


GetModuleHandleWin#

IntPtr GetModuleHandleWin(string lpFileName);

Parameters

lpFileName: string

Returns: IntPtr



TsManager#

TsManager

Root component aggregator that is used by Teslasuit components.

It can be placed into the scene where the Teslasuit components are used, but it's not required at all. TsManager sets DontDestroyOnLoad flag, so the object with this component will be alive between the scenes.

Properties

Instance — TsManager (read-only)

Root — TsRoot (read-only)

Returns TsRoot instance created in this session.

Fields

m_root TsRoot

Methods

Awake#

void Awake();

InitTsManager#

void InitTsManager();

InitializeRoot#

void InitializeRoot();

OnDestroy#

void OnDestroy();

Destroy#

void Destroy();