/// <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());}
}

UnityWebPlayer打开文件相关推荐

  1. Ubuntu 打开文件 (使用nautilus )

    有时候编译完代码之后想直击打开apk 或者其他的 所在的文件夹 我们在终端中输入nautilus  xx (xx 文件夹的路径) 然后执行回车这样就直接打开文件夹了. 一般在终端中输入nau 在按下t ...

  2. Linux最大打开文件描述符数

    1.    系统最大打开文件描述符数:/proc/sys/fs/file-max a.    查看 $ cat /proc/sys/fs/file-max 186405 2. 设置 a.    临时性 ...

  3. 操作系统学习:Linux0.12初始化详细流程-打开文件与加载可执行程序

    本文参考书籍 1.操作系统真相还原 2.Linux内核完全剖析:基于0.12内核 3.x86汇编语言 从实模式到保护模式 4.Linux内核设计的艺术 ps:基于x86硬件的pc系统 Linux0.1 ...

  4. JS实现HTML上用button打开文件对话框

    JS实现HTML上用button打开文件对话框 在HTML上有一button,点这个button的话,可以弹出文件选择的对话框,用ActiveX实现的,源码如下: Code  1<HTML> ...

  5. java中打开文件显示_从java程序中打开任何文件

    在 java中打开文件似乎有点棘手 – 对于.txt文件,必须将File对象与Scanner或BufferedReader对象结合使用 – 对于图像IO,必须使用 ImageIcon类 – 如果要打开 ...

  6. linux c 判断文件打开文件,Linux 用C语言判断文件和文件夹

    Linux 用C语言判断文件和文件夹 #include #include #include #include int access(const char *pathname, int mode); i ...

  7. 打开文件和关闭文件的含义

    <程序设计基础-c语言>杨莉 刘鸿翔 ISBN-978-7-03-032903-5 p257 习题8 2.打开文件和关闭文件的含义是什么?打开文件和关闭文件各意味着什么? 打开文件--&g ...

  8. visual code 在标签页打开_VSCode 不在新标签页打开文件如何解决?

    预览模式(Preview mode) 刚接触 VSCode 的时候想同时打开多个文件,但在操作的时候发现每次通过 VSCode 自带的文件浏览器点开一个新文件时,这个新文件都会直接在当前标签页打开,而 ...

  9. 如何找到文件的家-打开文件对话框openFileDialog

    private void button1_Click(object sender, EventArgs e){openFileDialog1.Filter = "*.txt|*.txt&qu ...

  10. [转]VC6.0无法打开文件和无法向工程添加文件的解决办法

    今天用VC开发的时候,新建两个类后,发现没有要类视图那里显示,在文件那里也没看到,于是就想自己手动把这两个类加到工程中去,没想到一点添加文件就发生内存读写错误.开始以为是软件出错了,重启软件后,还是一 ...

最新文章

  1. 为什么Redis要比Memcached更火?
  2. Webpack4 高手之路 第一天
  3. linux vnc 屏幕大小,Linux系统下vnc 的配置和使用方法
  4. 卖家工具箱源码_我的测试和代码分析工具箱
  5. java hexits,[Java]浅谈Java的异常体系
  6. gevent的同步与异步
  7. WORD中插入的公式与文字对不齐——公式比文字高——文字比公式低
  8. postgres-xc postgres 分布式数据库的一种
  9. Angr安装与使用之使用篇(十三)
  10. flutter 加载gif图片
  11. CC2530单片机精确延时的时间分析
  12. APP测试与WEB测试
  13. python编写鸡兔同笼程序_鸡兔同笼问题的python实现
  14. c#mvc模式进行crud_实用的微服务开发模式:CRUD与。 CQRS
  15. ls只显示文件名/只显示文件夹名
  16. 网页形式的php抓取文件,PHP 抓取网页源文件
  17. LAMP 技术简介(3)
  18. Windows将鼠标单击转换为双击的原理
  19. 跳槽如何谈薪资?不以升职加薪为目的的跳槽,都是耍流氓!
  20. 利用Python爬取《囧妈》豆瓣短评数据,并进行snownlp情感分析

热门文章

  1. ubuntu 18.04.1安装hadoop3.1.2
  2. SpringSecurity初步理解
  3. 【Uva 1633】Dyslexic Gollum
  4. CentOS系统配置 iptables防火墙
  5. 每日一句 i'm by disposition one of life's neutrals,a human Switzerland
  6. docker及入门使用(centos7.6)
  7. 【C语言】05-printf和scanf函数
  8. linux的for循环乘积,最大乘积连续子串 - Triangle23 - OSCHINA - 中文开源技术交流社区...
  9. java集合复习笔记-java集合继承关系图
  10. gcc CFLAGS中调试和优化标志