Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

UnityInterface

Class
Read time 4 minutesLast updated 19 hours ago

Inheritance
Inherited Members
Namespace: UnityEngine.Pixyz.Unity
public class UnityInterface : Interface

Methods

GetLastError

public static string GetLastError()
Returns

Type

Description

string

ConfigureFunctionLogger

[HandleProcessCorruptedStateExceptions]public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
Parameters

Type

Name

Description

stringfunctionName
boolenableFunction
boolenableParameters
boolenableExecutionTime

GetD3D11Device

[HandleProcessCorruptedStateExceptions]public IntPtr GetD3D11Device()
Returns

Type

Description

IntPtr

GetD3D11RenderTargetViewFromRenderBuffer

[HandleProcessCorruptedStateExceptions]public IntPtr GetD3D11RenderTargetViewFromRenderBuffer(IntPtr surface)
Parameters

Type

Name

Description

IntPtrsurface
Returns

Type

Description

IntPtr

GetD3D11ShaderResourceViewFromNativeTexture

[HandleProcessCorruptedStateExceptions]public IntPtr GetD3D11ShaderResourceViewFromNativeTexture(uint texture)
Parameters

Type

Name

Description

uinttexture
Returns

Type

Description

IntPtr

GetD3D11TextureFromNativeTexture

[HandleProcessCorruptedStateExceptions]public IntPtr GetD3D11TextureFromNativeTexture(uint texture)
Parameters

Type

Name

Description

uinttexture
Returns

Type

Description

IntPtr

GetD3D11TextureFromRenderBuffer

[HandleProcessCorruptedStateExceptions]public IntPtr GetD3D11TextureFromRenderBuffer(IntPtr buffer)
Parameters

Type

Name

Description

IntPtrbuffer
Returns

Type

Description

IntPtr

GetDestroyFunction

[HandleProcessCorruptedStateExceptions]public IntPtr GetDestroyFunction()
Returns

Type

Description

IntPtr

GetDrawFunction

[HandleProcessCorruptedStateExceptions]public IntPtr GetDrawFunction()
Returns

Type

Description

IntPtr

GetInitFunction

[HandleProcessCorruptedStateExceptions]public IntPtr GetInitFunction()
Returns

Type

Description

IntPtr

AsyncPick

Asynchronous function to pick in the current viewer.
[HandleProcessCorruptedStateExceptions]public void AsyncPick(uint session, int x, int y)
Parameters

Type

Name

Description

uintsession
intx
inty

AsyncResize

Call this function when the texture has to be resized. the resize will take effect during the next render. This will send a ViewSessionResized event when done.
[HandleProcessCorruptedStateExceptions]public void AsyncResize(uint session, int width, int height)
Parameters

Type

Name

Description

uintsession
intwidthViewer width.
intheightViewer height.

CreateUnityViewSession

[HandleProcessCorruptedStateExceptions]public uint CreateUnityViewSession(int width, int height, GraphicAPI graphicAPI, int nbViews = 1)
Parameters

Type

Name

Description

intwidthViewer width.
intheightViewer height.
GraphicAPIgraphicAPIGraphic api used by Unity.
intnbViewsNb views.
Returns

Type

Description

uint

AddUnityViewSessionDestroyedCallback

public uint AddUnityViewSessionDestroyedCallback(UnityInterface.UnityViewSessionDestroyedDelegate callback, IntPtr userData)
Parameters Returns

Type

Description

uint

RemoveUnityViewSessionDestroyedCallback

public void RemoveUnityViewSessionDestroyedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddUnityViewSessionHasPickedCallback

public uint AddUnityViewSessionHasPickedCallback(UnityInterface.UnityViewSessionHasPickedDelegate callback, IntPtr userData)
Parameters Returns

Type

Description

uint

RemoveUnityViewSessionHasPickedCallback

public void RemoveUnityViewSessionHasPickedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddUnityViewSessionInitializedCallback

public uint AddUnityViewSessionInitializedCallback(UnityInterface.UnityViewSessionInitializedDelegate callback, IntPtr userData)
Parameters Returns

Type

Description

uint

RemoveUnityViewSessionInitializedCallback

public void RemoveUnityViewSessionInitializedCallback(uint id)
Parameters

Type

Name

Description

uintid

AddUnityViewSessionResizedCallback

public uint AddUnityViewSessionResizedCallback(UnityInterface.UnityViewSessionResizedDelegate callback, IntPtr userData)
Parameters

Type

Name

Description

UnityInterface.UnityViewSessionResizedDelegatecallback
IntPtruserData
Returns

Type

Description

uint

RemoveUnityViewSessionResizedCallback

public void RemoveUnityViewSessionResizedCallback(uint id)
Parameters

Type

Name

Description

uintid

GetVulkanDevice

[HandleProcessCorruptedStateExceptions]public IntPtr GetVulkanDevice()
Returns

Type

Description

IntPtr