This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void CopyAndReplaceDirectory(string srcPath, string dstPath) | |
{ | |
if (Directory.Exists(dstPath)) | |
{ | |
Directory.Delete(dstPath); | |
} | |
if (File.Exists(dstPath)) | |
{ | |
File.Delete(dstPath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public static class AndroidSignCheck | |
{ | |
private const string c_PackageName = "com.yangzhenlin.unitydemo"; | |
public static byte[] GetSignature() | |
{ | |
//Player = new UnityPlayer(); | |
AndroidJavaClass Player = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class ZipMng | |
{ | |
public static byte[] Compress(byte[] originalData) | |
{ | |
using (MemoryStream outms = new MemoryStream()) | |
{ | |
using (MemoryStream inms = new MemoryStream(originalData)) | |
{ | |
using (GZipStream gzs = new GZipStream(outms, CompressionMode.Compress)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Bit | |
{ | |
private const int INT_MAX_LENGTH = 32; | |
private const byte BYTE_MAX_LENGTH = 8; | |
public static bool Read(int source, int index) | |
{ | |
Debug.Assert(index >= 0 && index < INT_MAX_LENGTH); | |
return 0 != (source & (1 << index)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
public static class PathCombine | |
{ | |
public static string Combine(params string[] subPath) | |
{ | |
if (null == subPath || 0 == subPath.Length) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace UnityEngine.Simulation | |
{ | |
public class Object | |
{ | |
private static int s_IdCount = 0; | |
private int m_InstanceID; | |
private bool m_Alive = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Text; | |
public static class StatusHandler | |
{ | |
private static readonly Dictionary<string, BindingFlags> m_BindingFlagsDic = | |
new Dictionary<string, BindingFlags> | |
{ |
OlderNewer