登录
  • 欢迎访问 Sharezer Blog

2016年07月的内容

Adb

adb 安装系统app

步骤: 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) 2432浏览 0评论 0个赞

Unity

WaitForSecondsRealtime

通过继承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) 3702浏览 0评论 0个赞

Unity

Unity GetType(string)得到Type

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) 7002浏览 0评论 7个赞

Editor

Hierarchy排序

    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) 3068浏览 0评论 0个赞

Unity

Unity GL画一条贝塞尔曲线

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) 3587浏览 0评论 0个赞

Unity

Unity GL画直线

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个赞