0
Unity3d에서 게임을했고 JS (UnityScript) 및 C#을 사용하여 스크립트를 작성했습니다. JS 스크립트에는 C# 스크립트에서 액세스해야하는 변수가 있습니다.C# 스크립트에서 JS 스크립트의 변수에 액세스하는 방법은 무엇입니까?
이렇게 할 수 있습니까?
Script.js :
public var myVarible;
Script.cs :
class A {
void B() {
Script script; // Compiler can't see Script
script = GameObject.Find ("MyScripts").GetComponent<Script>();
script.myVariable = false;
}
}
가능한 중복 [우우에 UnityScript에서 변수를 사용하는 방법?] (http://stackoverflow.com/questions/28274895/how-to-use-variables- from-unityscript-in-boo) – Bart