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 ChinaDate | |
{ | |
private static ChineseLunisolarCalendar china = new ChineseLunisolarCalendar(); | |
private static Hashtable gHoliday = new Hashtable(); | |
private static Hashtable nHoliday = new Hashtable(); | |
private static string[] JQ = { "小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", "白露", "秋分", "寒露", "霜降", "立冬", "小雪", "大雪", "冬至" }; | |
private static int[] JQData = { 0, 21208, 43467, 63836, 85337, 107014, 128867, 150921, 173149, 195551, 218072, 240693, 263343, 285989, 308563, 331033, 353350, 375494, 397447, 419210, 440795, 462224, 483532, 504758 }; | |
static ChinaDate() | |
{ |
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
void GetStreamingAssetsPath(string fileName) | |
{ | |
#if UNITY_EDITOR | |
dbPath = string.Format(@"Assets/StreamingAssets/{0}", fileName); | |
#else | |
// check if file exists in Application.persistentDataPath | |
var filepath = string.Format("{0}/{1}", Application.persistentDataPath, fileName); | |
if (!File.Exists(filepath)) |
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
void GetStreamingAssetsPath(string fileName) | |
{ | |
#if UNITY_EDITOR | |
dbPath = string.Format(@"Assets/StreamingAssets/{0}", fileName); | |
#else | |
// check if file exists in Application.persistentDataPath | |
var filepath = string.Format("{0}/{1}", Application.persistentDataPath, fileName); | |
if (!File.Exists(filepath)) |
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; | |
using UnityEngine.Networking; | |
using System; | |
using System.IO; | |
using System.Net; | |
using System.Threading; | |
public class UnityHttpListener : MonoBehaviour | |
{ |
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; | |
using UnityEditor; | |
using System.Text; | |
namespace MyUtil | |
{ | |
[InitializeOnLoad] | |
public partial class CustomDefines | |
{ | |
private const string ScriptPath = "/Util/Editor/MyDefines.cs"; //path including the name of to the (to be) generated File |
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; | |
using UnityEditor; | |
using System.IO; | |
using System.Linq; | |
using System.Collections; | |
public class BatchBuild { | |
// Android ビルド | |
[MenuItem("Build/Android")] |
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.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using UnityEditor; | |
using UnityEngine; | |
#if UNITY_2018 || UNITY_2017 | |
using UnityEditor.Build.Reporting; | |
#else |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// Mono singleton Class. Extend this class to make singleton component. | |
/// Example: | |
/// <code> | |
/// public class Foo : MonoSingleton<Foo> | |
/// </code>. To get the instance of Foo class, use <code>Foo.instance</code> |