Class MARSSession
Represents the runtime behavior of MARS. One of these must be in any scene with MARS content for it to function properly
Namespace: Unity.MARS
Syntax
public class MARSSession : MonoBehaviour, IUsesFunctionalityInjection
Fields
LicensingUrl
Declaration
public const string LicensingUrl = null
Field Value
Type | Description |
---|---|
String |
NotEntitledMessage
Declaration
public const string NotEntitledMessage = null
Field Value
Type | Description |
---|---|
String |
NotEntitledMessageWithUrl
Declaration
public const string NotEntitledMessageWithUrl = null
Field Value
Type | Description |
---|---|
String |
Properties
Instance
Currently active MARS session singleton instance
Declaration
public static MARSSession Instance { get; }
Property Value
Type | Description |
---|---|
MARSSession |
island
Active functionality island for the MARS session
Declaration
public FunctionalityIsland island { get; }
Property Value
Type | Description |
---|---|
FunctionalityIsland |
RequestedMaximumFaceCount
The maximum number of tracked faces requested by this session
Declaration
public int RequestedMaximumFaceCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
requirements
Functionality requirements for the MARS session
Declaration
public Capabilities requirements { get; }
Property Value
Type | Description |
---|---|
Capabilities |
Methods
CheckCapabilities()
Check the capabilities required in the MARS session
Declaration
public bool CheckCapabilities()
Returns
Type | Description |
---|---|
Boolean |
|
EnsureRuntimeState(Transform)
Ensures that a MARS Scene has all required components and configuration
Declaration
public static void EnsureRuntimeState(Transform overrideUserRef = null)
Parameters
Type | Name | Description |
---|---|---|
Transform | overrideUserRef | Override the creation of a new user prefab with an exiting one |
EnsureSessionInActiveScene()
Ensures that the active scene has a MARS Session
Declaration
public static MARSSession EnsureSessionInActiveScene()
Returns
Type | Description |
---|---|
MARSSession | Thew newly created MARSSession, or null if a session previously exists |
FindExistingInstance()
Search all loaded scenes for MARSSession objects and set the first one to the Instance property, if any exist
Declaration
public static void FindExistingInstance()