GUIStyle mystyle = new GUIStyle("some string from the list below");
- "CN Box"
- "Button"
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net; | |
using System.Net.Security; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using UnityEngine; |
using UnityEngine; | |
using UnityEditor; | |
public class FBXMeshExtractor | |
{ | |
private static string _progressTitle = "Extracting Meshes"; | |
private static string _sourceExtension = ".FBX"; | |
private static string _targetExtension = ".asset"; | |
public class Story | |
{ | |
public int INDEX; | |
/// <summary> | |
/// 剧情阶段 | |
/// </summary> | |
public int Step; | |
/// <summary> | |
/// 剧情类型(int) | |
/// 0:动画,1:声音(说话等),2:移动,3:展示与隐藏(用于剧情人物出现在不同的地方), |
using System; | |
using System.Collections.Generic; | |
using System.IO.Ports; | |
using System.Text; | |
using System.Threading; | |
namespace ButflyCOM | |
{ | |
public class ButflyCOMPort | |
{ |
-- Using lua to parse CSV file to a table. | |
-- Notice: first line must be data description filed. | |
-- The separator is '|', change it if you want. | |
-- Usage: csv = require('csv') | |
-- tab = csv.load('test.csv', ',') | |
-- table.foreach(tab[1], print) | |
-- print(tab[1].you_field) | |
--encoding=utf-8 |
using System.Collections; | |
using System.Collections.Generic; | |
public class UniqueString | |
{ | |
// 'removable = false' means the string would be added to the global string pool | |
// which would stay in memory in the rest of the whole execution period. | |
public static string Intern(string str, bool removable = true) | |
{ | |
if (str == null) |
[MenuItem("Tools/ClearConsole")] | |
private static void ClearConsole() | |
{ | |
#if UNITY_5 | |
var logEntries = System.Type.GetType("UnityEditorInternal.LogEntries,UnityEditor.dll"); | |
var clearMethod = logEntries.GetMethod("Clear", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public); | |
clearMethod.Invoke(null,null); | |
#elif UNITY_2017 | |
var assembly = Assembly.GetAssembly(typeof(SceneView)); | |
var type = assembly.GetType("UnityEditor.LogEntries"); |
"collisionBounds" : { | |
"CollisionBoundsColorGammaA" : 0, | |
"CollisionBoundsColorGammaR" : 255 | |
}, |
IEnumerator GetFile() | |
{ | |
string path = "D:\\Resource4Code\\php\\file\\"; | |
Debug.Log(path); | |
if (!Directory.Exists(path)) | |
{ | |
Directory.CreateDirectory(path); | |
} | |
UnityWebRequest www = new UnityWebRequest("127.0.0.1/filedownload.php"); | |
www.downloadHandler = new DownloadHandlerBuffer(); |