File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1+ import { UnityEventParameter } from "./unity-event-parameters" ;
12import { UnityInstance } from "./unity-instance" ;
23import { UnityProvider } from "./unity-provider" ;
34
@@ -40,6 +41,18 @@ type UnityContext = {
4041 */
4142 readonly requestPointerLock : VoidFunction ;
4243
44+ /**
45+ * Sends a message to the UnityInstance to invoke a public method.
46+ * @param gameObjectName the name of the game object in your Unity scene.
47+ * @param methodName the name of the public method on the game object.
48+ * @param parameter an optional parameter to pass along to the method.
49+ */
50+ readonly sendMessage : (
51+ gameObjectName : string ,
52+ methodName : string ,
53+ parameter ?: UnityEventParameter
54+ ) => void ;
55+
4356 /**
4457 * An unsafe reference to the Unity Instance.
4558 * This reference should be used with caution, as it may not be available
You can’t perform that action at this time.
0 commit comments