Click or drag to resize

ScriptReferenceAddFunctionListener Method

Add a function that will be called when this script reference is invoked. The target visual is prepended to the script reference's original signature such that an event like OnBlocked would expect a function like this to be passed: function (target : Visual, sender : Visual, load : Visual) The functions are cleared upon each reset, removing the need for cleanup. The function list is not persisted upon model save.

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 14.0.0.10531
Syntax
C#
public void AddFunctionListener(
	Visual target,
	Function function
)

Parameters

target
Type: Demo3D.VisualsVisual

[Missing <param name="target"/> documentation for "M:Demo3D.Visuals.ScriptReference.AddFunctionListener(Demo3D.Visuals.Visual,Demo3D.Script.Function)"]

function
Type: Function

[Missing <param name="function"/> documentation for "M:Demo3D.Visuals.ScriptReference.AddFunctionListener(Demo3D.Visuals.Visual,Demo3D.Script.Function)"]

See Also