PiXYZAPI
Class
阅读时间3 分钟最后更新于 2 个月前
Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.API
public class PiXYZAPI : Interface
Constructors
PiXYZAPI(IntPtr)
public PiXYZAPI(IntPtr session)
Parameters
Type | Name | Description |
|---|---|---|
| IntPtr | session |
Fields
Session
public IntPtr Session { get; }
Returns
Type | Description |
|---|---|
| IntPtr |
ProductName
public string ProductName { get; }
Returns
Type | Description |
|---|---|
| string |
Core
public CoreInterface Core { get; }
Returns
Type | Description |
|---|---|
| CoreInterface |
Geom
public GeomInterface Geom { get; }
Returns
Type | Description |
|---|---|
| GeomInterface |
Material
public MaterialInterface Material { get; }
Returns
Type | Description |
|---|---|
| MaterialInterface |
Polygonal
public PolygonalInterface Polygonal { get; }
Returns
Type | Description |
|---|---|
| PolygonalInterface |
CAD
public CADInterface CAD { get; }
Returns
Type | Description |
|---|---|
| CADInterface |
Algo
public AlgoInterface Algo { get; }
Returns
Type | Description |
|---|---|
| AlgoInterface |
Scene
public SceneInterface Scene { get; }
Returns
Type | Description |
|---|---|
| SceneInterface |
View
public ViewInterface View { get; }
Returns
Type | Description |
|---|---|
| ViewInterface |
IO
public IOInterface IO { get; }
Returns
Type | Description |
|---|---|
| IOInterface |
Unity
public UnityInterface Unity { get; }
Returns
Type | Description |
|---|---|
| UnityInterface |
SessionId
Get the session ID of the current session.
public uint SessionId { get; }
Returns
Type | Description |
|---|---|
| uint |
Methods
GetLastError
public static string GetLastError()
Returns
Type | Description |
|---|---|
| string |
Initialize
Initialize Pixyz API and create a new session.
public static PiXYZAPI Initialize(string productName = "", string validationKey = "", string[] optionalTokenList = null, string license = "")
Parameters
Type | Name | Description |
|---|---|---|
| string | productName | Product name. |
| string | validationKey | Product validation key. |
| string[] | optionalTokenList | Token list to initialize the product with. |
| string | license | License file (content). |
Returns
Type | Description |
|---|---|
| PiXYZAPI |
Release
Release Pixyz API and clear the session.
public void Release()
ActiveSessions
List all active sessions.
public static List<PiXYZAPI> ActiveSessions()
Returns
Type | Description |
|---|---|
| List<PiXYZAPI> |
SetUnityLicenseClientChannels
Set the licensing channel name to use if using a Unity license. Use if the licensing client was launched by another process (e.g the Unity Hub or the Unity Editor).
Should be called before initialization.
Should be called before initialization.
public static void SetUnityLicenseClientChannels(string channelName, string secondaryChannelName)
Parameters
Type | Name | Description |
|---|---|---|
| string | channelName | Channel name to which to connect. |
| string | secondaryChannelName | Secondary channel name to which to connect. |
StartServer
Start a Pixyz gRPC server.
public void StartServer(string host, ushort port, bool blocking = true)
Parameters
Type | Name | Description |
|---|---|---|
| string | host | Host address to bind to. |
| ushort | port | Port to listen on. |
| bool | blocking | If true, blocks until server stops; if false, runs in background. |
StartClient
Connect to a Pixyz gRPC server.
public void StartClient(string host, ushort port)
Parameters
IsRemote
Returns true if the current session is a remote session (connected to a server).
public bool IsRemote()
Returns
Type | Description |
|---|---|
| bool |