Class TofArManager
SDK共通機能を提供
Inheritance
Implements
Inherited Members
Namespace: TofAr.V0
Assembly: TofArAssembly.dll
Syntax
public class TofArManager : Singleton<TofArManager>, IDisposable
Fields
autoTrackCameraPose
trueの場合、毎フレームごとにcameraPoseTrackerからCameraPoseを取得する。
Declaration
[HideInInspector]
public bool autoTrackCameraPose
Field Value
Type |
---|
System.Boolean |
cameraPoseTracker
nullでは無い場合、CameraPoseを取得しキャッシュする。CameraPoseはCameraPosePropertyを介し他のコンポーネントへ公開される。
Declaration
[HideInInspector]
public Transform cameraPoseTracker
Field Value
Type |
---|
UnityEngine.Transform |
deviceOrientationUpdateIntervalMs
デバイス回転の検出間隔(ミリ秒)
Declaration
public uint deviceOrientationUpdateIntervalMs
Field Value
Type |
---|
System.UInt32 |
deviceOrientationUpdateIntervalMsOnEditorDebbug
TofArServerとの接続時のデバイス回転の検出間隔(ミリ秒)
Declaration
public uint deviceOrientationUpdateIntervalMsOnEditorDebbug
Field Value
Type |
---|
System.UInt32 |
EnabledOrientations
有効な端末方向
Declaration
[HideInInspector]
public EnabledOrientation EnabledOrientations
Field Value
Type |
---|
EnabledOrientation |
postInternalSessionStart
内部セッション開始後イベント
Declaration
public UnityEvent postInternalSessionStart
Field Value
Type |
---|
UnityEngine.Events.UnityEvent |
postInternalSessionStop
内部セッション停止後イベント
Declaration
public UnityEvent postInternalSessionStop
Field Value
Type |
---|
UnityEngine.Events.UnityEvent |
preInternalSessionStart
内部セッション開始前イベント
Declaration
public UnityEvent preInternalSessionStart
Field Value
Type |
---|
UnityEngine.Events.UnityEvent |
preInternalSessionStop
内部セッション停止前イベント
Declaration
public UnityEvent preInternalSessionStop
Field Value
Type |
---|
UnityEngine.Events.UnityEvent |
serverDisconnected
サーバー切断時イベント
Declaration
public UnityEvent serverDisconnected
Field Value
Type |
---|
UnityEngine.Events.UnityEvent |
Properties
CameraStartOrder
ColorストリームとDepthストリームを開始する順番
Declaration
public CameraStartOrder CameraStartOrder { get; }
Property Value
Type |
---|
CameraStartOrder |
InternalSessionStarted
trueの場合内部セッションが開始している
Declaration
public bool InternalSessionStarted { get; }
Property Value
Type |
---|
System.Boolean |
IsMirroring
trueの場合、映像を左右反転する
Declaration
public bool IsMirroring { get; set; }
Property Value
Type |
---|
System.Boolean |
Logger
ログ出力処理
Declaration
public static Logger Logger { get; }
Property Value
Type |
---|
Logger |
RuntimeSettings
実行時設定
Declaration
public RuntimeSettingsProperty RuntimeSettings { get; }
Property Value
Type |
---|
RuntimeSettingsProperty |
Stream
ストリーム
Declaration
public Stream Stream { get; }
Property Value
Type |
---|
SensCord.Stream |
UsingIos
iOS端末チェック
※ ToF AR Server を使用している場合、ToF AR Server が動作している端末の情報になります
Declaration
public bool UsingIos { get; }
Property Value
Type |
---|
System.Boolean |
Version
コンポーネントのバージョン番号
Declaration
public string Version { get; }
Property Value
Type |
---|
System.String |
Methods
Awake()
Declaration
protected override void Awake()
Overrides
Dispose()
破棄処理
Declaration
public void Dispose()
Dispose(Boolean)
破棄処理
Declaration
public void Dispose(bool ignoreEventRelease)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | ignoreEventRelease | trueの場合、イベントハンドラのクリアをスキップする |
ForceUpdateCameraPose()
TofArManager.cameraPoseTrackerのCameraPoseを強制的に取得し、内部キャッシュを更新する
Declaration
public void ForceUpdateCameraPose()
ForceUpdateDeviceOrientation()
強制的の画面方向と端末方向のキャッシュを更新する
Declaration
public void ForceUpdateDeviceOrientation()
GetConfigSource()
端末固有設定ロード元を取得する
Declaration
public ConfigSource GetConfigSource()
Returns
Type | Description |
---|---|
ConfigSource | 端末固有設定ロード元 |
GetDeviceOrientation()
デバイス回転を取得する
Declaration
public int GetDeviceOrientation()
Returns
Type | Description |
---|---|
System.Int32 | デバイス回転方向(単位:度)を下記値で返却
|
GetProperty<T>()
コンポーネントプロパティを取得する
Declaration
public T GetProperty<T>()
where T : class, IBaseProperty, new()
Returns
Type | Description |
---|---|
T | プロパティクラス |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty継承クラス |
GetProperty<T>(T)
コンポーネントプロパティを取得する。入力パラメータvalueを指定可能。
Declaration
public T GetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | 入力パラメータ |
Returns
Type | Description |
---|---|
T | プロパティクラス |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty継承クラス |
GetProperty<T>(T, Int32)
シリアライズ用バッファサイズを指定してコンポーネントプロパティを取得する。入力パラメータvalueを指定可能。
Declaration
public T GetProperty<T>(T value, int bufferSize)
where T : class, IBaseProperty, new()
Parameters
Type | Name | Description |
---|---|---|
T | value | 入力パラメータ |
System.Int32 | bufferSize | シリアライズ用バッファサイズ |
Returns
Type | Description |
---|---|
T | プロパティクラス |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty継承クラス |
GetPropertyList()
Propertyリストを取得する
Declaration
public string[] GetPropertyList()
Returns
Type | Description |
---|---|
System.String[] | Propertyリスト |
GetScreenOrientation()
画面方向を取得する
Declaration
public int GetScreenOrientation()
Returns
Type | Description |
---|---|
System.Int32 | 画面方向(単位:度)を下記値で返却
|
IsUsingAVFoundation()
trueの場合、AVFoundationを使用している
Declaration
public bool IsUsingAVFoundation()
Returns
Type | Description |
---|---|
System.Boolean | trueの場合、AVFoundationを使用している |
SetProperty<T>(T)
コンポーネントプロパティを設定する
Declaration
public void SetProperty<T>(T value)
where T : class, IBaseProperty
Parameters
Type | Name | Description |
---|---|---|
T | value | 入力パラメータ |
Type Parameters
Name | Description |
---|---|
T | IBaseProperty継承クラス |
StartInternalSession()
内部セッションを開始する
Declaration
public void StartInternalSession()
Exceptions
Type | Condition |
---|---|
SensCord.ApiException | 例外 |
StartInternalSession(Boolean, String, String)
内部セッションを開始する
Declaration
public void StartInternalSession(bool enableNetworkDebugging, string debugServerIpAddress, string defaultServerPort)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enableNetworkDebugging | trueの場合、サーバーへのネットワーク接続を有効とする。Android, iOS端末上で実行している場合設定は無視される |
System.String | debugServerIpAddress | サーバーのIPアドレス文字列。Android, iOS端末上で実行している場合設定は無視される |
System.String | defaultServerPort | サーバーのポート番号文字列。Android, iOS端末上で実行している場合設定は無視される |
Exceptions
Type | Condition |
---|---|
SensCord.ApiException | 例外 |
StopInternalSession()
内部セッションを停止する
Declaration
public void StopInternalSession()
Events
OnApplicationPausing
アプリケーション一時停止開始時
Declaration
public static event TofArManager.ApplicationPausingEventHandler OnApplicationPausing
Event Type
Type | Description |
---|---|
TofArManager.ApplicationPausingEventHandler |
OnApplicationResuming
アプリケーション復帰開始時
Declaration
public static event TofArManager.ApplicationResumingEventHandler OnApplicationResuming
Event Type
Type | Description |
---|---|
TofArManager.ApplicationResumingEventHandler |
OnDeviceOrientationUpdated
デバイス回転変更通知
※ ToF AR Server を使用している場合、ToF AR Server が動作している端末の情報になります
Declaration
public static event TofArManager.OnDeviceRotationChangedEvent OnDeviceOrientationUpdated
Event Type
Type | Description |
---|---|
TofArManager.OnDeviceRotationChangedEvent |
OnMirrorSettingUpdated
左右反転設定変更通知
Declaration
public static event TofArManager.OnMirrorSettingChangedEvent OnMirrorSettingUpdated
Event Type
Type | Description |
---|---|
TofArManager.OnMirrorSettingChangedEvent |
OnScreenOrientationUpdated
画面方向変更通知
※ ToF AR Server を使用している場合、ToF AR Server が動作している端末の情報になります
Declaration
public static event TofArManager.OnScreenRotationChangedEvent OnScreenOrientationUpdated
Event Type
Type | Description |
---|---|
TofArManager.OnScreenRotationChangedEvent |