資源簡(jiǎn)介
1.Unity按鍵事件的實(shí)現(xiàn)
2.WinForm內(nèi)嵌Unity3D
3.axUnityWebPlayer的Src的動(dòng)態(tài)設(shè)置,右鍵禁用,隱藏圖標(biāo)實(shí)現(xiàn)進(jìn)度條加載
代碼片段和文件信息
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)?“測(cè)試“))
????????{
????????????_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);
????}
}
評(píng)論
共有 條評(píng)論