UnityWebPlayer打开文件
来源:互联网 发布:爱淘宝精品推荐 编辑:程序博客网 时间:2024/06/07 05:10
/// <summary>/// 加载资源文件(格式为*.unity3d)./// </summary>/// <param name="src">The source.</param>public void OpenFile(string src){ try { if (string.IsNullOrWhiteSpace(src)) return; if (!File.Exists(src)) return; if (this.unityPlayer != null) { this.unityPlayer.Dispose(); this.unityPlayer = null; } this.unityPlayer = new AxUnityWebPlayerAXLib.AxUnityWebPlayer(); ((System.ComponentModel.ISupportInitialize)(this.unityPlayer)).BeginInit(); this.Controls.Add(this.unityPlayer); ((System.ComponentModel.ISupportInitialize)(this.unityPlayer)).EndInit(); this.unityPlayer.src = src; AxHost.State state = this.unityPlayer.OcxState; this.unityPlayer.Dispose(); this.unityPlayer = new AxUnityWebPlayerAXLib.AxUnityWebPlayer(); ((System.ComponentModel.ISupportInitialize)(this.unityPlayer)).BeginInit(); this.SuspendLayout(); this.unityPlayer.Dock = DockStyle.Fill; this.unityPlayer.Name = "viewControl1"; this.unityPlayer.OcxState = state; this.unityPlayer.TabIndex = 0; this.unityPlayer.OnExternalCall += Unity_OnExternalCall; this.panel1.Controls.Clear(); this.panel1.Controls.Add(this.unityPlayer); this.panel1.Controls.Add(this.m_logo); this.m_logo.BringToFront(); ((System.ComponentModel.ISupportInitialize)(this.unityPlayer)).EndInit(); this.ResumeLayout(false); } catch (Exception err) { Debug.WriteLine(err.ToString()); }}
0 0
- UnityWebPlayer打开文件
- 【Unity&UnityWebPlayer】UnityWebPlayer在哪里下载
- unitywebplayer屏蔽鼠标右键
- UnityWebPlayer缓存清理工具
- 设置UnityWebPlayer宽高100%
- U3DPlayer UnityWebPlayer动态改变src
- UnityWebPlayer屏蔽右键及全屏
- 打开路径打开文件
- 打开文件
- 打开文件
- 打开文件
- 文件打开
- 打开文件
- 打开文件
- ~~~打开文件~~~
- 打开文件
- 打开文件
- 文件打开
- 蓝桥杯 ALGO-150 算法训练 6-1 递归求二项式系数值
- Pie HDU - 1969
- iOSCALayer简介
- 多文件修改编码
- tensorflow data reading (2)
- UnityWebPlayer打开文件
- Visual C++解决error C2859问题
- layer iframe层的使用,传参
- 罗辑思维-无广告的增强知识收集器
- 冒泡排序和查找数组中最大的数及查找两个数中最大的数
- Sysdig:Linux服务器监控和排障利器
- 分治思想之归并排序
- 新手常见的python运行错误
- WebView学习一