資源簡介
1.Unity按鍵事件的實現
2.WinForm內嵌Unity3D
3.axUnityWebPlayer的Src的動態設置,右鍵禁用,隱藏圖標實現進度條加載
代碼片段和文件信息
using?UnityEngine;
using?System.Collections;
using?System;
public?class?Main?:?MonoBehaviour
{
????private?string?_messageReceive?=?string.Empty;
????private?bool?_isButtonclick?=?false;
????private?int?_notifyTimeAfterLoadComplete?=?3;
????//?Use?this?for?initialization
????void?Start()
????{
????}
????//?Update?is?called?once?per?frame
????void?Update()
????{
????}
????void?OnGUI()
????{
????????if?(GUI.Button(new?Rect(100?10?80?20)?“測試“))
????????{
????????????_isButtonclick?=?!_isButtonclick;
????????}
????????GUI.Label(new?Rect(50?30?150?30)?_messageReceive);
????????if?(_isButtonclick)
????????{
????????????Application.ExternalCall(“ToWinform“?Guid.NewGuid().ToString());
????????????_isButtonclick?=?false;
????????}
????????if?(_notifyTimeAfterLoadComplete>0)
????????{
????????????Application.ExternalCall(“LOAD_COMPLETE“?““);
????????????_notifyTimeAfterLoadComplete--;
????????}
????}
????void?CallUnity(object?val)
????{
????????_messageReceive?=?string.Format(“{0}“?val);
????}
}
- 上一篇:物資管理系統
- 下一篇:零件交易中心課程設計sql數據庫
評論
共有 條評論