Version: 5.4
public static void ExternalEval (string script);

Parameters

script The Javascript function to call.

Description

Оценивает фрагмент скрипта в содержащей веб странице (только Web Player).

This will execute JavaScript script function in the web page that contains the web player or WebGL content.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { Application.ExternalEval("history.back()"); } }

Note that web player is not supported from 5.4.0 onwards. See Also: Application.ExternalCall.