サンプル: ブラウザ JavaScript 通信
サンプル: Flash Vars

サンプル: Stage をアクセス

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Flash Stage を C#/JavaScript スクリプトから次の方法でアクセス出来ます:

ActionScript.Import("com.unity.UnityNative"); 
ActionScript.Statement("trace(UnityNative.stage);");


サンプルとして,次の C# コードにより SWF に供給された Flash 変数を出力します:

ActionScript.Import("com.unity.UnityNative"); 
ActionScript.Statement(
    "var params:Object = LoaderInfo(UnityNative.stage.loaderInfo).parameters;" +
    "var key:String;" +
    "for (key in params) {" +
        "trace(key + '=' + params[key]);" +
    "}"
);


サンプル: ブラウザ JavaScript 通信
サンプル: Flash Vars