get_time can only be called from the main thread.のエラーがコンソールに出ました!
問題なく動くのですが、以下エラーがコンソールに出ます。
誰かご教授をお願いします。
床を動かすプログラムです。
ソースは
*********************************************
private var nowPosition : Vector3;
function Awake() {
nowPosition = transform.position;
}
function Update() {
var offs = Vector3(Mathf.Sin(Time.time),0,0);
transform.position = nowPosition + offs;
}
var offs = Vector3(Mathf.Sin(Time.time),0,0) * 4;
**********************************************
! get_time can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don’t use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
! ArgumentException: get_time can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don’t use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
UpDownMove..ctor () (at Assets/JavaScript/UpDownMove.js:17)
2013年5月16日
コメントを残す