UDN
Search public documentation:
GFxVariableAccessCH
English Translation
日本語訳
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
日本語訳
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
怎样从一个外部SWF文件访问变量
概述
这个例子指导您如何在虚幻脚本中从一个外部SWF文件访问变量。
var MyString:String = "Something cool"; var MyNumber:Number = 37; var MyBoolean:Boolean = true;
var bool myBoolean; var string myString; var float myNumber; var GFxObject RootMC RootMC = GetVariableObject("_root"); /* Get AS Vars */ myBoolean = RootMC.GetBool("MyBoolean"); myString = RootMC.GetString("MyString"); myNumber = RootMC.GetFloat("MyNumber"); `log("##### MyBoolean: "@myBoolean); `log("##### MyString: "@myString); `log("##### MyNumber: "@myNumber); /* Set AS Vars */ RootMC.SetBool("MyBoolean", false); RootMC.SetString("MyString", "Something AWESOME!"); RootMC.SetFloat("MyNumber", 100); `log("##### MyString changed to: "@RootMC.GetString("MyString"));