Click or drag to resize

ScriptProxy Methods

The ScriptProxy type exposes the following members.

Methods
  NameDescription
Public methodCall(String)
Attempt to call a method on the managed type with the specified name. This works in a similar way as SendMessage(String) where the method name is specified. The target method must not accept any arguments.
Public methodCall(String, Object)
Attempt to call a method on the managed type with the specified name and arguments. This works in a similar was as SendMessage(String) where the method name is specified. Any number of arguments may be specified but the target method must expect the arguments.
Public methodCall(String, ProxyCallConvention)
Attempt to call a method on the managed instance with the specified name. This works in a similar way as SendMessage(String) where the method name is specified. The target method must not accept any arguments.
Public methodCall(String, ProxyCallConvention, Object)
Attempt to call a method on the managed instance with the specified name and arguments. This works in a similar was as SendMessage(String) where the method name is specified. Any number of arguments may be specified but the target method must expect the arguments.
Public methodDispose
Dispose of the proxy and its managed script instance. Once disposed, the proxy should never be accessed again. Only call this method once you are sure you will never need the instance again.
Public methodGetInstanceAsT
Attempts to get the managed instance as the specified generic type.
Public methodGetInstanceType
Get the system type of the managed script type.
Public methodMakePersistent
If the managed object is a Unity type then this method will call 'DontDestroyOnLoad' to ensure that the object is able to survie scene loads.
Public methodSafeCall(String)
Attempt to call a method on the managed type with the specified name. Any exceptions thrown as a result of location or calling the method will be caught silently. This works in a similar was as SendMessage(String) where the target method name is specified. The target method must not accept any arguments.
Public methodSafeCall(String, Object)
Attempt to call a method on the managed type with the specified name. Any exceptions thrown as a result of location or calling the method will be caught silently. This works in a similar was as SendMessage(String) where the target method name is specified. Any number of arguments may be specified but the target method must expect the arguments.
Public methodSafeCall(String, ProxyCallConvention)
Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as SendMessage(String) where the target method name is specified. The target method must not accept any arguments.
Public methodSafeCall(String, ProxyCallConvention, Object)
Attempt to call a method on the managed instance with the specified name. Any exceptions thrown as a result of locating or calling the method will be caught silently. This works in a similar was as SendMessage(String) where the target method name is specified. Any number of arguments may be specified but the target method must expect the arguments.
Top
See Also