摘要: 很多unity开发者比较纠结IOS document操作,本文将以读取document下的图片为例,实现Document扫盲,此篇为下一篇续集,document下的图片是拍照完成后保存的。保存图片到document操作如下:-(void)SavePngToDocument:(UIImage*)img{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);//获取document路径 NSString *documentsDirecto... 阅读全文
posted @ 2012-07-10 23:46 U_探索 阅读(2896) 评论(0) 推荐(0) 编辑
摘要: unity调用Admob广告服务和IOS调用没有太大区别,几乎80%的工作都是OC完成,Unity仅需要以插件形式调用OC函数就成,所以此文需要一定的OC基础,有了OC的基础,仅需要注意一点,unity导出的xcode工程与普通Xcode不同之处在于,unity导出的iPhone_target2AppDelegate文件不起作用,他把所有的代码都放到AppController里。祝大家好运!Admob1.h文件#import <UIKit/UIKit.h>#import "GADBannerViewDelegate.h"@class GADBannerView, 阅读全文
posted @ 2012-07-10 23:21 U_探索 阅读(2616) 评论(2) 推荐(0) 编辑
摘要: 白色上面为什么画不上?此文是对某位大神文章的翻译,忘记从哪摘抄的了 原文使用js写的我把它改成C#。此文存在一个问题,当屏幕上有texture的话,貌似texture上画不上。期待高手一块解决。另外当快速拖动鼠标时,发现画的曲线不够平滑,正在尝试用贝塞尔解决,期待高手一块探讨。GLDraw快速画线,不光滑问题搞定。贝塞尔曲线: 1 using UnityEngine; 2 using System.Collections; 3 4 5 public class joint{ 6 public Vector3 org; 7 public Vector3 end; 8 ... 阅读全文
posted @ 2012-07-10 22:59 U_探索 阅读(1724) 评论(0) 推荐(0) 编辑
摘要: 1 编辑模式(Editor)下:string path = EditorUtility.OpenFilePanel("Load png Textures of Directory", "", "");WWW ww=new WWW("file:///"+path);print(ww.url);yield return ww;gui.texture=ww.texture;2.非编辑模式:OpenFileDialog ofd = new OpenFileDialog(); //new一个方法ofd.InitialDire 阅读全文
posted @ 2012-07-10 13:02 U_探索 阅读(19725) 评论(6) 推荐(4) 编辑
摘要: itween插件官网:http://itween.pixelplacement.com/gettingstarted.php更新说明:oncompletetarget 表明回调函数所在的GameObject。如果把oncompletetarget写成当前gameObject,回调函数需要写在当前ga... 阅读全文
posted @ 2012-07-10 12:50 U_探索 阅读(5834) 评论(0) 推荐(0) 编辑
摘要: 1、网络检测函数(注意:需要在真机上实验,我原来在Imac上 断了网络检测不到)Application.internetReachabilitystatic var internetReachability : NetworkReachabilityReturns the type of Inter... 阅读全文
posted @ 2012-07-10 12:46 U_探索 阅读(4021) 评论(1) 推荐(1) 编辑