1直接在unity中接sdk渠道
http://bbs.bccn.net/thread-434855-1-1.html
http://www.abctools.cn/documentCenter/toJoy7Summary
2aapt命令能打包apk文件 可参考 http://www.ltesting.net/ceshi/ceshijishu/sjcs/android/2012/0511/204843.html
参考:http://docs.unity3d.com/Manual/class-MovieTexture.html
http://www.xuanyusong.com/archives/1019
Application.genuine用来判断appstore有没有被hack
3Android中用来判断是否联网
public static boolean isNetworkAvailable(Context context) {
ConnectivityManager cm = (ConnectivityManager) context
.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo info = cm.getActiveNetworkInfo();
if (info != null && info.getState() == NetworkInfo.State.CONNECTED)
return true;
return false;
}
4联网时可在手机上谈提示,“加载中”
Android:ProgressDialog.show(this, "", "connecting....",true, false);
ios的为
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
indicator.frame = CGRectMake(0.0, 0.0, 40.0, 40.0);
indicator.center = self.view.center;
[self.view addSubview:indicator];
[indicator bringSubviewToFront:self.view];
[UIApplication sharedApplication].networkActivityIndicatorVisible = TRUE;
ios可以参考:http://stackoverflow.com/questions/9976278/how-to-programmatically-add-a-simple-default-loadingprogress-bar-in-iphone-app
http://iosdevelopertips.com/user-interface/uialertview-without-buttons-please-wait-dialog.html
5.将网络上图片显示到guitexture上面
string url = "http://images.earthcam.com/ec_metros/ourcams/fridays.jpg";
WWW www = new WWW (url);
yield return www;
www.LoadImageIntoTexture (mTexture.texture as Texture2D);
6.joystick和easytouch 的使用
http://www.unitymanual.com/thread-5189-1-1.html?_dsign=986c0292
http://www.tuicool.com/articles/2Ebiy2j
ngui和esaytouch的结合,只触摸一个: http://www.xuanyusong.com/archives/2948
pinch 缩放 twist旋转 touch触摸 tap点击(按起时仍为对象本身)
7unity破解最新版本
http://forum.cgpersia.com/f13/unity-4-x-professional-valera3132-84060/
mac版本可以破解,需要将破解之后的Unity_v4.x.ulf和Unity文件在Mac环境中执行下
chmod +x Unity
chmod +x Unity_v4.x.ulf
变成可执行的文件,然后再去替换
参考:http://blog.csdn.net/chenggong2dm/article/details/15028815
8从打出的包.asset、assetbundle等提取出资源(原则上可以提取出所有的资源)
用disunity导出解压缩后的apk或ipa文件,然后用PVRTexTool工具把KTX批量转成PNG格式
参考:https://github.com/ata4/disunity
http://www.xuanyusong.com/archives/2584
http://community.imgtec.com/developers/powervr/installers/
9播放unity视频
用theora converter软件将视频转成unity识别的ogv格式,然后代码里面可以调用
参考:http://blog.csdn.net/awnuxcvbn/article/details/17618919
不过Android和ios需要将视频放入到stringAsssets目录下面
用Handheld.PlayFullScreenMovie来调用
StreamingAssets用来将资源文件不经过unity改变直接放入到对应的平台目录下面
根目录:StreamingAssets文件夹
#if UNITY_EDITOR
string filepath = Application.dataPath +"/StreamingAssets"+"/my.xml";
#elif UNITY_IPHONE
string filepath = Application.dataPath +"/Raw"+"/my.xml";
#elif UNITY_ANDROID
string filepath = "jar:file://" + Application.dataPath + "!/assets/"+"/my.xml;
#endif
参考:
参考:http://docs.unity3d.com/Manual/class-MovieTexture.html
http://www.xuanyusong.com/archives/1019
http://answers.unity3d.com/questions/305407/how-to-check-if-handheldplayfullscreenmovie-has-st.html
http://docs.unity3d.com/Manual/class-MovieTexture.html
http://www.xuanyusong.com/archives/1019
参考:http://docs.unity3d.com/Manual/class-MovieTexture.html
http://www.xuanyusong.com/archives/1019
10.ngui的按钮实现点击按钮变亮
可以参考这里 点击打开链接
11.继承于Attribute类的定义可以runtime时获得类中的属性和值
参考:http://www.dotblogs.com.tw/junegoat/archive/2012/10/23/c-sahrp-system-attribute.aspx
http://www.cnblogs.com/jailu/archive/2007/09/17/896171.html
12 protobuf的学习
13支持unity5的unityvs
https://visualstudiogallery.msdn.microsoft.com/20b80b8c-659b-45ef-96c1-437828fe7cf2
http://unityvs.com/news/2015/03/11/unity-5-visual-studio-tools-unity-2-0-preview/
14 ugui的动画tween可以用插件dotween来做,比较方便
15 android学习