位置: 编程技术 - 正文
推荐整理分享unity项目总结方法2(unity项目流程),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:unity项目流程,unity项目策划,unity项目介绍ppt,unity项目策划,unity开发项目,unity项目策划案范文,unity项目介绍ppt,unity报告总结,内容如对您有帮助,希望把文章链接给更多的朋友!
4. 测量距离
Ray ray=Camera.main.ScreenPointToRay(Input.mousePosition);
if(Input.GetMouseButton(0))
{
if(Physics.Raycast(ray,out hit,))
{
if(cejupos1== Vector3.zero)
cejupos1 = hit.point;
cejupos2= hit.point;
lineRenderer.SetPosition(0,cejupos1);
lineRenderer.SetPosition(1,cejupos2);
lblceju.GetComponent<UILabel>().text="长度为:"Vector3.Distance(cejupos1,cejupos2).ToString("#0.")"米";
}
}
else
{
cejupos1= Vector3.zero;
}
5. 复原场景
(1) 记录场景物体位置
GameObject[]diaoGuis=GameObject.FindGameObjectsWithTag("Cf_diaogui1");
StringBuilder bulid=new StringBuilder();
string oName=obj.transform.name;
bulid.Append(oName",");
float Px=obj.transform.position.x;
bulid.Append(Px",");
………………..
(2) 复原
string ss=System.Text.Encoding.UTF8.GetString(www.bytes);
string[] chas=ss.Split(new char[]{','});
while(true)
{
if(index>=chas.Length-1)
{
break;
}
stringasset="Prefab/chufang/"chas[index];
floatx=float.Parse(chas[index1]);
float y=float.Parse(chas[index2]);
………………
GameObjectob= = (GameObject)Instantiate(Resources.Load(asset),pos,Quaternion.Euler(rot));
ob.transform.localScale= sca;
index=;
}
NGUI 制作简易背包UI 前言本文由作者@zx一路飞奔出品,转载请注明出处文章地址:
Unity3D研究院之IOS触摸屏手势控制镜头旋转与缩放 前几篇文章介绍了很多Unity3D引擎自身的一些问题,今天我们在回到IOS设备上讨论一些触摸屏幕手势,本章的目标是通过触摸iPhone屏幕手势实现模型左右
Xsolla采访《仙剑5前传之心愿》 说到仙剑这部经典的武侠题材游戏,是小编正式接触网络游戏的第一款作品,相信,也给许多玩家带来了许多美好的回忆。今天,Xsolla采访到了《仙剑5
标签: unity项目流程
本文链接地址:https://www.jiuchutong.com/biancheng/378852.html 转载请保留说明!上一篇:unity3d利用sharesdk分享内容至微信、新浪微博、qq空间等国内主流社交平台(ios篇)(unity3D利用W,A,S,D让物体移动)
友情链接: 武汉网站建设