赞
踩
unity5.0下载地址:https://pan.baidu.com/s/1B3-bPMIIIHc_u9AdVjk02w
提取码:4sj9
高版本2018 为webgl发布 据说可以实现 但实际操作时仍有问题
webbrowser 自带浏览器内核加载报错
换成google内核页面无显示
又换了webview的是edge内核 说是支持webgl 但是加载webgl页面加载不出来
失败链接......
【C#】首发!Win10使用C#调用Edge浏览器内核控件来展示H5或WebGL!
https://blog.csdn.net/sjt223857130/article/details/80698438
C#将WebBowser控件替换为Chrome内核
https://blog.csdn.net/ma_jiang/article/details/53812117
using UnityEngine; using System.Collections; using UnityEngine.UI; public class Test_SelfRotate : MonoBehaviour { public float rotateSpeed = 15.0f; public bool isRotate = false; public Text text; private string str; private void Update() { if (isRotate) { this.transform.Rotate(Vector3.up * rotateSpeed * Time.deltaTime); } } /// <summary> /// unity发送信息给Winform窗体 /// </summary> public void SendMessageToWPF() { // Application.ExternalCall("文本测试", "这是Unity发来的文本内容"); Application.ExternalCall("swj", str); } //开始旋转物体 public void StartRotateGameObject() { isRotate = true; } //停止旋转物体 public void PauseRotateGameObject() { isRotate = false; } //Unity接收WPF的信息 public void GetWPFSendMessage(float speed) { this.isRotate = true; this.rotateSpeed = speed; text.text = "接收到的旋转速度为:" + speed.ToString(); } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace UnityIntoWinformTest09 { public partial class Form1 : Form { private string inputSpeed;//输入框的速度 private double speed;//真实的速度 public Form1() { InitializeComponent(); } private void axUnityWebPlayer1_OnExternalCall(object sender, AxUnityWebPlayerAXLib._DUnityWebPlayerAXEvents_OnExternalCallEvent e) { label1.Text = e.value; } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { axUnityWebPlayer1.SendMessage("Cube", "GetWPFSendMessage", 100); } private void label1_Click(object sender, EventArgs e) { } } }
相关链接
内嵌
https://blog.csdn.net/xiaochenXIHUA/article/details/82760723
exe内嵌
https://blog.csdn.net/llhswwha/article/details/79373245
控制
https://www.cnblogs.com/nearpengju123/p/4494563.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。