【发布时间】:2012-07-31 14:48:16
【问题描述】:
我正在尝试使用 Unity3D 制作智能手机应用程序,并且正在使用 unityscript。我从 Prime31 购买了一些插件,它们都可以正常工作,但是示例脚本是用 C# 编写的。
我想把下面的例子转成JS:
var buttons = new string[] { "Save", "Cancel" };
EtceteraBinding.showAlertWithTitleMessageAndButtons( "Alert!", "Do you want to save?", buttons );
我试过这样:
var buttons:String[];
buttons=["Save","Cancel"];
EtceteraBinding.showAlertWithTitleMessageAndButtons( "Alert!", "Do you want to save?", buttons );
这不好,["Save","Cancel"] 课程在第一个按钮中显示,而在另一个按钮中什么也没有?
我做错了什么?
【问题讨论】:
-
在unity3d论坛找到你的问题forum.unity3d.com/threads/…
-
你做错的是没有使用 C#。 Prime 的东西不是为你正在使用的憎恶而设计的。
标签: c# unity3d unityscript