// <summary>
/// 使用GZIP压缩文件的方法
/// </summary>
/// <param name="sourcefilename">源文件路径</param>
/// <param name="zipfilename">压缩文件路径</param>
/// <returns>返回bool操作结果,成功true,失败 flase</returns>
public static bool GZipFile(string sourcefil……继续阅读 »
sharezer
8年前 (2016-08-05) 4203浏览 0评论
3个赞
A
abstract 抽象的
abstract base class (ABC)抽象基类
abstract class 抽象类
abstraction 抽象、抽象物、抽象性
access 存取、访问
access function 访问函数
access level访问级别
account 账户
action 动作
activate 激活
active 活动的
actual parameter 实参
adapter 适配器
add-in 插件
address 地址
address space 地址空间
ADO(ActiveX Data Object)ActiveX数据对象
……继续阅读 »
sharezer
8年前 (2016-08-03) 2364浏览 0评论
0个赞
步骤:
root权限
解除目录权限
拷贝更新文件
赋值644权限给安装的文件
重启
su
mount -o remount/system/app
cp mnt/sdcard/sda1/DanceDemp.apk /system/app //app下有时候不行,改到/system下
chmod 644 /system/app/DanceDemp.apk
reboot
……继续阅读 »
sharezer
8年前 (2016-07-27) 2440浏览 0评论
0个赞
通过继承Unity5.3新加入的CustomYieldInstruction类,即可自定义协程
定义WaitForSecondsRealtime不受Time.timeScale影响
使用方法与WaitForSecond一样
public class WaitForSecondsRealtime : CustomYieldInstruction
{
private float waitTime;
public override bool keepWaiting
{
get { return Time.realtimeSinceStart……继续阅读 »
sharezer
8年前 (2016-07-27) 3706浏览 0评论
0个赞
Unity中的类,能过正常调用Type.GetType()得不到Type
可能通过程序集取得
Unity有运行时和编辑器时两个程序集,分别为:
Assembly-CSharp
Assembly-CSharp-Editor
通过Assembly.GetExecutingAssembly()获取包含当前执行的代码的程序集
//从当前执行的程序集中获取Type
public Type GetType(string TypeName)
{
return System.Reflection.Assembly.GetExecutingAssembly().GetType(TypeName);
……继续阅读 »
sharezer
8年前 (2016-07-26) 7006浏览 0评论
7个赞
使用指定类型的默认构造函数来创建该类型的实例。
Namespace: System
程序集: mscorlib(位于 mscorlib.dll 中)
语法
C#
VB
public static Object CreateInstance(
Type type
)
参数
type类型: System.Type
要创建的对象的类型。
……继续阅读 »
sharezer
8年前 (2016-07-26) 3400浏览 0评论
0个赞
using UnityEditor;
using UnityEngine;
public class 升序排列 : BaseHierarchySort
{
public override GUIContent content
{
get { return new GUIContent("升序"); }
}
public override int Compare(GameObject lhs, GameObject rhs)
{
if (lhs == rhs)……继续阅读 »
sharezer
8年前 (2016-07-26) 3071浏览 0评论
0个赞
……继续阅读 »
sharezer
8年前 (2016-07-25) 11877浏览 1评论
3个赞
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.Collections.Generic;
public class DrawLineWindow : EditorWindow
{
[MenuItem("Tools/测试")]
public static void ShowWindow()
{
DrawLineWindow window = EditorWindow.GetWindow(typeof(DrawL……继续阅读 »
sharezer
8年前 (2016-07-15) 3595浏览 0评论
0个赞
public class DrawLineWindow : EditorWindow
{
[MenuItem("Tools/测试")]
public static void ShowWindow()
{
DrawLineWindow window = EditorWindow.GetWindow(typeof(DrawLineWindow)) as DrawLineWindow;
window.Init();
}
private Material lineMaterial;
……继续阅读 »
sharezer
8年前 (2016-07-15) 3665浏览 0评论
1个赞