Flash 整合Unity3D 教程 例子 public class MyLoader extends Sprite implements IUnityContentHost { private var unityContentLoader:UnityContentLoader; public function MyLoader() { var params:UnityLoaderParams = new UnityLoaderParams(false,720,400,false); unityContentLoader = new UnityContentLoader("UnityContent.swf", this, params, false); unityContentLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onUnityContentLoaderProgress); unityContentLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onUnityContentLoaderComplete); unityContentLoader.loadUnity(); } private function onUnityContentLoaderProgress(eventrogressEvent):void { //Respond to load progress } private function onUnityContentLoaderComplete(event:Event):void { addChild(unityContentLoader); unityContentLoader.unityContent.setContentHost(this); } //unityInitStart has to be implemented by whatever implements IUnityContenthost //This is called when the content is loaded and the initialization of the unity engine is started. public function unityInitStart():void { //Unity engine started } //unityInitComplete has to be implemented by whatever implements IUnityContenthost //This is called when the unity engine is done initializing and the first level is loaded. public function unityInitComplete():void { unityContentLoader.unityContent.sendMessage("Main Camera","SetResponder",{responder:this}); } ... },
- webavatar2012-12-21这个是写给程序猿看的,路线是讲清楚了,是否可行我还没有试过
- 留给明天2014-08-05非常感谢楼主的分享,讲的挺仔细的
- topreap2013-05-18只能做参考,看了不到一半,要有很强的as3基础
- Sonexh2013-03-06可以使用,还算不错。
- 桃桃是只狗2013-11-12确实是整合,整合了网上很多地方的资料,不过也算辛苦了,有些帮助的。
- 粉丝: 1
- 资源: 4
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助