[英]iGUI for Unity 3D
Well,I am working on my graduation project with unity 3d pro v4.5.0 ..I was using the normal method OnGUI() in my scripts but now i want to make a better interface for my project and i didn't anderstand how can i replace for example these lines in my "Database" Script: 好吧,我正在使用unity 3d pro v4.5.0进行毕业设计。..我在脚本中使用的是普通方法OnGUI(),但现在我想为我的项目提供更好的界面,而我并没有理解我在“数据库”脚本中替换了以下这些行:
if (GUILayout.Button ("Add to database"))
{
// Insert the data
InsertRow (FirstName,LastName);
// And update the readout of the database
databaseData = ReadFullTable ();
}
With just calling a Button1_click for example from my iGUI Class specially that every thing related to interface and buttons exists in OnGUI() method so how can i change all of that in my "Database" Script..i did anderstand how to make a button in iGUI that LOAD a scene or set an other function in the same iGUI Class but i just want to make buttons and iGUI field texts in iGUI MonoBehaviour Class and call them later whenever i need in my pricipal script "Database" if it is possible.Please am so in need for help. 例如,仅从我的iGUI类中仅调用Button1_click,与接口和按钮相关的所有事物都存在于OnGUI()方法中,因此我如何在我的“数据库”脚本中更改所有这些内容。我确实了解如何制作按钮在加载场景或在同一iGUI类中设置其他功能的iGUI中,但是我只想在iGUI MonoBehaviour类中创建按钮和iGUI字段文本,并在以后需要时在主脚本“数据库”中尽可能地调用它们。请急需帮助。 Thank you in advance.
先感谢您。
You need do this: 您需要这样做:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.