GUIStyle mystyle = new GUIStyle("some string from the list below");
- "CN Box"
- "Button"
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using UnityEngine; | |
| /// <summary> | |
| /// A simple free camera to be added to a Unity game object. | |
| /// | |
| /// Keys: |
| using UnityEditor; | |
| using UnityEngine; | |
| public sealed class ExampleClass : EditorWindow | |
| { | |
| private static readonly string[] mList = | |
| { | |
| "AboutWIndowLicenseLabel" , | |
| "AC LeftArrow" , | |
| "AC RightArrow" , |
| -- split a string | |
| function string:split(delimiter) | |
| local result = { } | |
| local from = 1 | |
| local delim_from, delim_to = string.find( self, delimiter, from ) | |
| while delim_from do | |
| table.insert( result, string.sub( self, from , delim_from-1 ) ) | |
| from = delim_to + 1 | |
| delim_from, delim_to = string.find( self, delimiter, from ) | |
| end |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "Stmt1432372934255", | |
| "Action": [ | |
| "dynamodb:DeleteItem", | |
| "dynamodb:GetItem", | |
| "dynamodb:PutItem", | |
| "dynamodb:Scan", |
| delegate void JobResultHandler(bool result); | |
| public static void DoJobAsync (string someParameter, JobResultHandler jobResultHandler = null) | |
| { | |
| //If callback is null; we do not need unity adapter, otherwise we need to create it in ui thread. | |
| ThreadAdapter adapter = jobResultHandler == null ? null : CreateUnityAdapter (); | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| using UnityEditor; | |
| using UnityEngine; | |
| /// <summary> | |
| /// A base class for creating editors that decorate Unity's built-in editor types. | |
| /// </summary> | |
| public abstract class DecoratorEditor : Editor |
| # Simulator for depth comparison error (i.e. z-fighting) | |
| # Nathan Reed, June 2015 | |
| # Written for Python 3.4; requires numpy | |
| import math | |
| import numpy as np | |
| import optparse | |
| # Parse command-line options | |
| parser = optparse.OptionParser() |
| internal class ProcessStarter | |
| { | |
| internal void StartExeToProcessMessage(string pathToExe, CustomQueueMessage customMsg) | |
| { | |
| string serializedMsg = JsonConvert.SerializeObject(customMsg); | |
| using (Process p = GetProcessAfterStarting(pathToExe)) | |
| { | |
| p.StandardInput.WriteLine(serializedMsg); | |
| p.OutputDataReceived += (sender, args) => Console.WriteLine("Data receied from child exe - {0}", args.Data); | |
| p.EnableRaisingEvents = true; |