步骤:
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个赞
通过继承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中的类,能过正常调用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个赞
使用指定类型的默认构造函数来创建该类型的实例。
Namespace: System
程序集: mscorlib(位于 mscorlib.dll 中)
语法
C#
VB
public static Object CreateInstance(
Type type
)
参数
type类型: System.Type
要创建的对象的类型。
……继续阅读 »
sharezer
8年前 (2016-07-26) 3397浏览 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) 3068浏览 0评论
0个赞
……继续阅读 »
sharezer
8年前 (2016-07-25) 11875浏览 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) 3587浏览 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个赞