摘要: Application.OpenURL(字符串); 阅读全文
posted @ 2017-11-06 16:20 朋丶Peng 阅读(2411) 评论(0) 推荐(0) 编辑
摘要: 一. 1.新建一个UGUI的Button,删掉它的Image组件,添加一个Raw Image组件.如图: 由于删除了Image组件,所以画圈的位置是空的,运行后会自动把Raw Image添加到那里. 2.新建一个脚本挂到Button上. 3.运行. 二. 1.新建一个Button. 2.新建一个脚本 阅读全文
posted @ 2017-11-06 16:15 朋丶Peng 阅读(1748) 评论(0) 推荐(0) 编辑
摘要: transform.Find(""); 找到子游戏对象,找自己找不到,能找到未激活的子游戏对象. 括号里可以是游戏对象的名字,也可以是层级. GameObject.Find("") 找Hierarchy面板下的游戏对象,未激活的找不到. 括号里可以是游戏对象的名字,也可以是层级. 阅读全文
posted @ 2017-11-06 14:46 朋丶Peng 阅读(674) 评论(0) 推荐(0) 编辑
摘要: 1. 可视化创建及事件绑定 # 1 : 通过 Hierarchy 面板创建 UI > Button. 2 : 创建一个脚本 TestClick.cs, 定义了一个 Click 的 public 方法(一定要是public的方法). 3 : 把 脚本 TestClick.cs 挂到一个游戏对象或者Bu 阅读全文
posted @ 2017-11-06 11:57 朋丶Peng 阅读(22801) 评论(3) 推荐(2) 编辑
摘要: 对于游戏存档,储存最高分,排行榜都需要用到储存,现在存储的方式有很多,可以存本地的Json,XML,Sqlite,还有一种就是unity自带的一种存储PlayerPrefs。 那么这个PlayerPrefs如何使用呢? 其实很简单,官方的API是里介绍了: 1、PlayerPrefs可以理解为持久化 阅读全文
posted @ 2017-11-06 11:28 朋丶Peng 阅读(1291) 评论(0) 推荐(0) 编辑
摘要: 1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4 using UnityEngine.UI; 5 6 public class PauseContorl : MonoBehaviour 7 { 8 bool isGamePause; 9 ... 阅读全文
posted @ 2017-11-02 11:16 朋丶Peng 阅读(3241) 评论(5) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2017-11-01 17:25 朋丶Peng 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-10-07 16:30 朋丶Peng 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-10-04 17:04 朋丶Peng 阅读(459) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-10-03 19:30 朋丶Peng 阅读(517) 评论(0) 推荐(0) 编辑