文档

Unity Engine

Unity Engine

ExternalEval(string)

Execution of a script function in the contained web page.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
警告
Deprecated. Application.ExternalEval is deprecated. See https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html for alternatives.
public static void ExternalEval(string script)

Parameters

script

The Javascript function to call.

Remarks

The HTML Javascript host page can have functions executed. The Application.ExternalEval function specifies which function should be executed.
This functionality is now obsolete. For alternative approaches, refer to Interaction with browser scripting.
Note: The Web Player is obsolete.
Additional Resources: Application.ExternalCall.