新的团结请帮助我

时间:2015-03-22 18:23:53

标签: c# unity3d

我在Unity 4.6中通过添加UI按钮在我的层次结构中创建了一个按钮,我想使用c#脚本引用该按钮并将其Interact able值更改为true。

1 个答案:

答案 0 :(得分:0)

嗯我不知道Unity3D UI有Interact成员。但是如果你想要引用Unity3D的新UI,首先必须添加UnityEngine.UI名称空间。

using UnityEngine.UI;
public Button myButton;
//make it public so you can Drag the Button GameObject to the Inspector

希望这有帮助。