Show / Hide Table of Contents

Class vCast

The vCast SDK manager.
vCast 開發包管理員。

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
vCast
vGear
Namespace: Votanic.vXR.vCast
Assembly: Votanic.vXR.dll
Syntax
[AddComponentMenu("")]
[DefaultExecutionOrder(-10)]
public class vCast : MonoBehaviour

Fields

autoApplySetting

Auto save current setting when building project.
建置項目時自動儲存設定。

Declaration
[Tooltip("Auto save current setting when building project.\n建置項目時自動儲存設定。")]
public bool autoApplySetting
Field Value
Type Description
System.Boolean

autoReceiveCommand

Auto receive command option.
自動接收指令選項。

Declaration
[Tooltip("Auto receive command option.\n自動接收指令選項。")]
public AutoReceiveCommand autoReceiveCommand
Field Value
Type Description
AutoReceiveCommand

buildBatches

The platforms to run the program.
這個項目會使用的平台。

Declaration
[Tooltip("The platforms to run the program.\n這個項目會使用的平台。")]
public Platform buildBatches
Field Value
Type Description
Platform

configPath

The path for reading the system config file.
讀取系統配置文件的路徑。

Declaration
[Tooltip("The path for reading the system config file.\n讀取系統配置文件的路徑。")]
public string configPath
Field Value
Type Description
System.String

consoleMode

Console mode setting of XR system.
XR 系統控制台模式設定。

Declaration
[Tooltip("Console mode setting of XR system.\nXR 系統控制台模式設定。")]
public Console consoleMode
Field Value
Type Description
Console

destroyOnStart

The objects will be destroyed on start.
開始時會被移除的物件。

Declaration
[Tooltip("The objects will be destroyed on start.\n開始時會被移除的物件。")]
public List<GameObject> destroyOnStart
Field Value
Type Description
System.Collections.Generic.List<UnityEngine.GameObject>

directory

Directory of project internal system files.
項目內置系統文件的路徑。

Declaration
[Tooltip("Directory of project internal system files.\n項目內置系統文件的路徑。")]
public const string directory = "Assets/Votanic/VotanicXR"
Field Value
Type Description
System.String

essential

Essential elements to initialize the XR system.
XR 系統初始化的必須元素。

Declaration
[Tooltip("Essential elements to initialize the XR system.\nXR 系統初始化的必須元素。")]
public Essential essential
Field Value
Type Description
Essential

fileLocation

The relative folder location of all system files.
所有系統檔案的相對文件夾位置。

Declaration
[Header("[System]")]
[Tooltip("The relative folder location of all system files.\n所有系統檔案的相對文件夾位置。")]
public FileLocation fileLocation
Field Value
Type Description
FileLocation

forceQuality

The quality setting will be set by setting file.
質素設定將會依據設置文件。

Declaration
[Header("[Performance]")]
[Tooltip("The quality setting will be set by setting file.\n質素設定將會依據設置文件。")]
public bool forceQuality
Field Value
Type Description
System.Boolean

GCCollect

Manual GC Collect option.
手動垃圾回收選項。

Declaration
[Tooltip("Manual GC Collect option.\n手動垃圾回收選項。")]
public GCCollect GCCollect
Field Value
Type Description
GCCollect

initialFading

Initial fade setting.
初始化過場設定。

Declaration
[Tooltip("Initial fade setting.\n初始化過場設定。")]
public InitialFading initialFading
Field Value
Type Description
InitialFading

launcherCommand

Receive commands from launcher.
接收啟動器的指令。

Declaration
[Tooltip("Receive commands from launcher.\n接收啟動器的指令。")]
public bool launcherCommand
Field Value
Type Description
System.Boolean

mobileGazeInteraction

Enable Mobile Gaze Interaction on start.
在開始時啟用移動裝置凝視互動。

Declaration
[Tooltip("Enable Mobile Gaze Interaction on start.\n在開始時啟用移動裝置凝視互動。")]
public bool mobileGazeInteraction
Field Value
Type Description
System.Boolean

onStartWatermark

Declaration
[HideInInspector]
public bool onStartWatermark
Field Value
Type Description
System.Boolean

referenceConfig

The path for reading the reference system config file.
讀取用作參考用途的系統配置文件的路徑。

Declaration
[Tooltip("The path for reading the reference system config file.\n讀取用作參考用途的系統配置文件的路徑。")]
public string referenceConfig
Field Value
Type Description
System.String

refreshRate

The refresh rate for the functions that no need to update each frame.
用於一些無須每幀更新的功能的更新速率。

Declaration
public static float refreshRate
Field Value
Type Description
System.Single

scenesInBuild

Enable this to save and load scenes in build setting by scene path, not the common setting.
啟用這個將會根據場景路徑儲存及讀取構建場景設定,不再是共用設定。

Declaration
[Tooltip("Enable this to save and load scenes in build setting by scene path, not the common setting.\n啟用這個將會根據場景路徑儲存及讀取構建場景設定,不再是共用設定。")]
public ScenesInBuild scenesInBuild
Field Value
Type Description
ScenesInBuild

settingPath

The path for reading the project setting file.
讀取項目設置文件的路徑。

Declaration
[Tooltip("The path for reading the project setting file.\n讀取項目設置文件的路徑。")]
public string settingPath
Field Value
Type Description
System.String

showReference

Show reference screen on editor.
在編輯器顯示參考屏幕。

Declaration
[Tooltip("Show reference screen on editor.\n在編輯器顯示參考屏幕。")]
public ShowReference showReference
Field Value
Type Description
ShowReference

targetFrameRate

Ideal FPS of this project.
這個項目的理想幀數。

Declaration
[Tooltip("Ideal FPS of this project.\n這個項目的理想幀數。")]
public int targetFrameRate
Field Value
Type Description
System.Int32

useEditorSetting

Override some settings from scene instead of json file when running in editor.
在編輯器運行時將從場景而不是 Json 文件覆蓋某些設置。

Declaration
[Tooltip("Override some settings from scene instead of json file when running in editor.\n在編輯器運行時將從場景而不是 Json 文件覆蓋某些設置。")]
public bool useEditorSetting
Field Value
Type Description
System.Boolean

XRSupport

Enable Unity XR support for using OpenVR.
啟用 Unity XR Support 以使用 OpenVR。

Declaration
[Tooltip("Enable Unity XR support for using OpenVR.\n啟用 Unity XR Support 以使用 OpenVR。")]
public XRSupport XRSupport
Field Value
Type Description
XRSupport

Properties

attribute

All attributes of the XR system.
XR 系統中的各種屬性。

Declaration
public static Attribute attribute { get; }
Property Value
Type Description
Attribute

controller

The first controller.
第一個控制器。

Declaration
public static vCast_Controller controller { get; }
Property Value
Type Description
vCast_Controller

environment

Return the type of system enviroment.
傳回系統環境的類型。

Declaration
public static SystemType environment { get; }
Property Value
Type Description
SystemType

frame

The environment center of XR world.
XR 世界的環境中心。

Declaration
public static Transform frame { get; }
Property Value
Type Description
UnityEngine.Transform

hand

The first user's navigator.
第一位使用者的導航部份。

Declaration
public static Transform hand { get; }
Property Value
Type Description
UnityEngine.Transform

head

The first user's synchronizer.
第一位使用者的同步部份。

Declaration
public static Transform head { get; }
Property Value
Type Description
UnityEngine.Transform

initialized

Return true if the XR system is initialized.
當 XR 系統已完成初始化時傳回 true。

Declaration
public static bool initialized { get; }
Property Value
Type Description
System.Boolean

layer

All layers of the XR system.
XR 系統中的各個層級。

Declaration
public static Layer layer { get; }
Property Value
Type Description
Layer

sceneIndex

Current scene index.
目前場景的編號。

Declaration
public static int sceneIndex { get; }
Property Value
Type Description
System.Int32

sensor

The first sensor.
第一個感應器。

Declaration
public static vCast_Sensor sensor { get; }
Property Value
Type Description
vCast_Sensor

separator

The characters for splitting string.
用作分拆字串的字符。

Declaration
public static char[] separator { get; }
Property Value
Type Description
System.Char[]

uiScreen

The screen of UI.
UI 屏幕。

Declaration
public static Screen uiScreen { get; set; }
Property Value
Type Description
Screen

user

The first user.
第一位使用者。

Declaration
public static vCast_User user { get; }
Property Value
Type Description
vCast_User

Methods

EnableMobileGazeInteraction(Boolean)

Enable Mobile Platform gaze interaction mode.
啟動移動平台凝視互動模式。

EnableMobileGazeInteraction(true)

Declaration
public static void EnableMobileGazeInteraction(bool enable)
Parameters
Type Name Description
System.Boolean enable

Enable the gaze interaction mode
啟動凝視互動模式

GetCamera(Int32)

Get Camera Node by index.
根據編號取得相機類節點。

GetCamera(0)

Declaration
public static Camera GetCamera(int index)
Parameters
Type Name Description
System.Int32 index

Camera Index
相機編號

Returns
Type Description
Camera

GetCamera(String)

Get Camera Node by name.
根據名稱取得相機類節點。

GetCamera("FrontScreenCamera")

Declaration
public static Camera GetCamera(string name)
Parameters
Type Name Description
System.String name

Camera Name
相機節點

Returns
Type Description
Camera

GetCameras()

Get all Camera Nodes in the scene.
取得場景中所有相機類節點。

Declaration
public static List<Camera> GetCameras()
Returns
Type Description
System.Collections.Generic.List<Camera>

GetController(Int32)

Get vCast Controller by index.
根據編號取得 vCast 控制器。

GetController(0)

Declaration
public static vCast_Controller GetController(int index)
Parameters
Type Name Description
System.Int32 index

Controller Index
控制器編號

Returns
Type Description
vCast_Controller

GetController(String)

Get vCast Controller by name.
根據名稱取得 vCast 控制器。

GetController("Controller")

Declaration
public static vCast_Controller GetController(string name)
Parameters
Type Name Description
System.String name

Controller Name
控制器名義

Returns
Type Description
vCast_Controller

GetControllers()

Get all vCast Controllers in the scene.
取得場景中所有 vCast 控制器。

Declaration
public static List<vCast_Controller> GetControllers()
Returns
Type Description
System.Collections.Generic.List<vCast_Controller>

GetDebug()

Return current debug attribute.
傳回目前偵錯屬性。

Declaration
public static bool GetDebug()
Returns
Type Description
System.Boolean

GetEntities()

Get all Entity Nodes in the scene.
取得場景中所有實體類節點。

Declaration
public static List<Entity> GetEntities()
Returns
Type Description
System.Collections.Generic.List<Entity>

GetEntity(Int32)

Get Entity Node by index.
根據編號取得實體類節點。

GetEntity(0)

Declaration
public static Entity GetEntity(int index)
Parameters
Type Name Description
System.Int32 index

Entity Index
實體編號

Returns
Type Description
Entity

GetEntity(String)

Get Entity Node by name.
根據名稱取得實體類節點。

GetEntity("Head")

Declaration
public static Entity GetEntity(string name)
Parameters
Type Name Description
System.String name

Entity Name
實體名稱

Returns
Type Description
Entity

GetNode(Int32)

Get Node by index.
根據編號取得節點。

GetNode(0)

Declaration
public static Node GetNode(int index)
Parameters
Type Name Description
System.Int32 index

Node Index
節點編號

Returns
Type Description
Node

GetNode(String)

Get Node by name.
根據名稱取得節點。

GetNode("Head")

Declaration
public static Node GetNode(string name)
Parameters
Type Name Description
System.String name

Node Name
節點名稱

Returns
Type Description
Node

GetNodes()

Get all Nodes in the scene.
取得場景中所有節點。

Declaration
public static List<Node> GetNodes()
Returns
Type Description
System.Collections.Generic.List<Node>

GetScreen(Int32)

Get Screen Node by index.
根據編號取得屏幕類節點。

GetScreen(0)

Declaration
public static Screen GetScreen(int index)
Parameters
Type Name Description
System.Int32 index

Screen Index
屏幕編號

Returns
Type Description
Screen

GetScreen(String)

Get Screen Node by name.
根據名稱取得屏幕類節點。

GetScreen("FrontScreen")

Declaration
public static Screen GetScreen(string name)
Parameters
Type Name Description
System.String name

Screen Name
屏幕名稱

Returns
Type Description
Screen

GetScreens()

Get all Screen Nodes in the scene.
取得場景中所有屏幕類節點。

Declaration
public static List<Screen> GetScreens()
Returns
Type Description
System.Collections.Generic.List<Screen>

GetSensor(Int32)

Get vCast Sensor by index.
根據編號取得 vCast 感應器。

GetSensor(0)

Declaration
public static vCast_Sensor GetSensor(int index)
Parameters
Type Name Description
System.Int32 index

Sensor Index
感應器編號

Returns
Type Description
vCast_Sensor

GetSensor(String)

Get vCast Sensor by name.
根據名稱取得 vCast 感應器。

GetSensor("Sensor")

Declaration
public static vCast_Sensor GetSensor(string name)
Parameters
Type Name Description
System.String name
Returns
Type Description
vCast_Sensor

GetSensors()

Get all vCast Sensors in the scene.
取得場景中所有 vCast 感應器。

Declaration
public static List<vCast_Sensor> GetSensors()
Returns
Type Description
System.Collections.Generic.List<vCast_Sensor>

GetSoul()

Return current soul attribute.
傳回目前靈魂屬性。

Declaration
public static bool GetSoul()
Returns
Type Description
System.Boolean

GetStereo()

Return current stereo attribute.
傳回目前立體屬性。

Declaration
public static bool GetStereo()
Returns
Type Description
System.Boolean

GetTest3D()

Return current test 3D attribute and display scene object state.
傳回目前測試 3D 屬性及是否顯示場景物件。

Declaration
public static bool[] GetTest3D()
Returns
Type Description
System.Boolean[]

GetTracking()

Return current tracking attribute.
傳回目前定位屬性。

Declaration
public static bool GetTracking()
Returns
Type Description
System.Boolean

GetTransform(String)

Get a transform under frame.
取得框架內的一個 Transform.

GetTransform("Head")

Declaration
public static Transform GetTransform(string name)
Parameters
Type Name Description
System.String name

Transform name
Transform 名稱

Returns
Type Description
UnityEngine.Transform

GetTransform(Transform, String)

Get a transform under frame.
取得母物件 Transform 內的一個 Transform.

GetTransform(transform, "Head")

Declaration
public static Transform GetTransform(Transform parent, string name)
Parameters
Type Name Description
UnityEngine.Transform parent

Parent transform
母物件 Transform

System.String name

Transform name
Transform 名稱

Returns
Type Description
UnityEngine.Transform

GetTransforms()

Get all transforms under frame.
取得框架內所有 Transform.

Declaration
public static List<Transform> GetTransforms()
Returns
Type Description
System.Collections.Generic.List<UnityEngine.Transform>

GetTransforms(Transform, Boolean)

Get all transforms under a parent transform.
取得母物件 Transform 內所有 Transform.

GetTransforms(transform)

Declaration
public static List<Transform> GetTransforms(Transform parent, bool includeSelf = true)
Parameters
Type Name Description
UnityEngine.Transform parent

Parent transform
母物件 Transform

System.Boolean includeSelf

Include self transform
包含自身 Transform

Returns
Type Description
System.Collections.Generic.List<UnityEngine.Transform>

GetTraveler()

Return current traveler attribute.
傳回目前旅行者屬性。

Declaration
public static bool GetTraveler()
Returns
Type Description
System.Boolean

GetUser(Int32)

Get vCast User by index.
根據編號取得 vCast 使用者。

GetUser(0)

Declaration
public static vCast_User GetUser(int index)
Parameters
Type Name Description
System.Int32 index

User Index
使用者編號

Returns
Type Description
vCast_User

GetUser(String)

Get vCast User by name.
根據名稱取得 vCast 使用者。

GetUser("User")

Declaration
public static vCast_User GetUser(string name)
Parameters
Type Name Description
System.String name

User Name
使用者名稱

Returns
Type Description
vCast_User

GetUserLevel(Int32)

Return the user level.
傳回使用者等級。

GetUserLevel()

Declaration
public static int GetUserLevel(int index = 0)
Parameters
Type Name Description
System.Int32 index

User Index
使用者編號

Returns
Type Description
System.Int32

GetUsers()

Get all vCast Users in the scene.
取得場景中所有 vCast 使用者。

Declaration
public static List<vCast_User> GetUsers()
Returns
Type Description
System.Collections.Generic.List<vCast_User>

LoadScene(Int32)

Load scene by index.
根據編號載入場景。

LoadScene(0)

Declaration
public static void LoadScene(int index)
Parameters
Type Name Description
System.Int32 index

Scene Index
場景編號

LoadScene(String)

Load scene by name.
根據名稱載入場景。

LoadScene("Main")

Declaration
public static void LoadScene(string name)
Parameters
Type Name Description
System.String name

Scene Name
場景名稱

Menu()

Open or close the bulit-in Menu.
打開或關閉內置選單。

Declaration
public static void Menu()

Menu(Boolean)

Open or close the bulit-in Menu.
打開或關閉內置選單。

Menu(true)

Declaration
public static void Menu(bool open)
Parameters
Type Name Description
System.Boolean open

Open if true
當 true 時打開

Menu(Boolean, Transform)

Open or close the bulit-in Menu at an object position and euler angles.
在某物件的位置及角度打開或關閉內置選單。

Menu(true, transform)

Declaration
public static void Menu(bool open, Transform transform)
Parameters
Type Name Description
System.Boolean open

Open if true
當 true 時打開

UnityEngine.Transform transform

The object transform
該物件的 Transform

Menu(Boolean, Vector3, Vector3)

Open or close the bulit-in Menu at target position and euler angles.
在目標位置及角度打開或關閉內置選單。

Menu(true, Vector3.zero, Vector3.zero)

Declaration
public static void Menu(bool open, Vector3 position, Vector3 eulerAngles)
Parameters
Type Name Description
System.Boolean open

Open if true
當 true 時打開

UnityEngine.Vector3 position

Target position
目標位置

UnityEngine.Vector3 eulerAngles

Target euler angles
目標角度

Menu(Transform)

Open or close the bulit-in Menu at an object position and euler angles.
在某物件的位置及角度打開或關閉內置選單。

Menu(transform)

Declaration
public static void Menu(Transform transform)
Parameters
Type Name Description
UnityEngine.Transform transform

The object transform
該物件的 Transform

Menu(Vector3, Vector3)

Open or close the bulit-in Menu at target position and euler angles.
在目標位置及角度打開或關閉內置選單。

Menu(Vector3.zero, Vector3.zero)

Declaration
public static void Menu(Vector3 position, Vector3 eulerAngles)
Parameters
Type Name Description
UnityEngine.Vector3 position

Target position
目標位置

UnityEngine.Vector3 eulerAngles

Target euler angles
目標角度

MountScreen(Screen, Transform, Boolean)

Mount an object the a screen.
將一個物件貼在屏幕上。

MountScreen(GetScreen("FrontScreen"), transform)

Declaration
public static void MountScreen(Screen screen, Transform transform, bool parent = false)
Parameters
Type Name Description
Screen screen

Target screen
目標屏幕

UnityEngine.Transform transform

Target object
目標物件

System.Boolean parent

Parent to screen if true
當 true 時作為屏幕的子物件

MountScreen(Screen, Transform, Vector3, Vector3, Boolean)

Mount an object the a screen.
將一個物件貼在屏幕上。

MountScreen(GetScreen("FrontScreen"), transform)

Declaration
public static void MountScreen(Screen screen, Transform transform, Vector3 position, Vector3 eulerAngles, bool parent = false)
Parameters
Type Name Description
Screen screen

Target screen
目標屏幕

UnityEngine.Transform transform

Target object
目標物件

UnityEngine.Vector3 position

Relative position to the screen
在屏幕的相對位置

UnityEngine.Vector3 eulerAngles

Relative euler angles to the screen
在屏幕的相對角度

System.Boolean parent

Parent to screen if true
當 true 時作為屏幕的子物件

ResetDebugRotation()

Reset all the rotation of debugging.
還原所有偵錯用的角度。

Declaration
public static void ResetDebugRotation()

ResetFrame()

Reset the frame position and rotation to start point.
還原框架位置及角度至起點。

Declaration
public static void ResetFrame()

ResetScene()

Reload the current scene.
重新載入目前場景。

Declaration
public static void ResetScene()

ResetUsers()

Reset all the users position and rotation to frame.
還原所有用家位置及角度至框架。

Declaration
public static void ResetUsers()

SetDebug(Boolean)

Enable or disable debug.
啟用或停用偵錯。

SetDebug(true)

Declaration
public static void SetDebug(bool debug)
Parameters
Type Name Description
System.Boolean debug

Enable if true
當 true 時啟用

SetMobileGazeDuration(Single)

Enable Mobile Platform gaze interaction mode.
啟動移動平台凝視互動模式。

EnableMobileGazeInteraction(true)

Declaration
public static void SetMobileGazeDuration(float gazeDuration)
Parameters
Type Name Description
System.Single gazeDuration

Duration for the gaze action
凝視的所需時間

SetSoul(Boolean)

Enable or disable soul.
啟用或停用靈魂。

SetSoul(true)

Declaration
public static void SetSoul(bool soul)
Parameters
Type Name Description
System.Boolean soul

Enable if true
當 true 時啟用

SetStereo(Boolean)

Enable or disable stereo.
啟用或停用立體。

SetStereo(true)

Declaration
public static void SetStereo(bool stereo)
Parameters
Type Name Description
System.Boolean stereo

Enable if true
當 true 時啟用

SetTest3D(Boolean, Boolean)

Enable or disable test 3D.
啟用或停用測試 3D。

SetStereo(true, false)

Declaration
public static void SetTest3D(bool test3D, bool translucent = false)
Parameters
Type Name Description
System.Boolean test3D

Enable if true
當 true 時啟用

System.Boolean translucent

Show scene objects if true
當 true 時顯示場景物件

SetTracking(Boolean, Boolean)

Enable or disable tracking.
啟用或停用定位。

SetTracking(true, false)

Declaration
public static void SetTracking(bool tracking, bool resetTransform = false)
Parameters
Type Name Description
System.Boolean tracking

Enable if true
當 true 時啟用

System.Boolean resetTransform

Reset to default position and rotation if true
當 true 時還原至預設位置及角度

SetTraveler(Boolean)

Enable or disable traveler.
啟用或停用旅行者。

SetTraveler(true)

Declaration
public static void SetTraveler(bool traveler)
Parameters
Type Name Description
System.Boolean traveler

Enable if true
當 true 時啟用

SetUserLevel(Int32, Int32)

Set and lock the user level.
設定及鎖定使用者等級。

SetUserLevel(3, -1)

Declaration
public static void SetUserLevel(int userLevel, int index = -1)
Parameters
Type Name Description
System.Int32 userLevel

User Level (0 will unlock level)
使用者等級(0 時解除鎖定)

System.Int32 index

User Index (-1 for all)
使用者編號(-1 為全部)

In This Article
Back to top Generated by DocFX