This file contains 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
Shader "WorldNormalFromDepthTexture" | |
{ | |
Properties { | |
[KeywordEnum(3 Tap, 4 Tap, Improved, Accurate)] _ReconstructionMethod ("Normal Reconstruction Method", Float) = 0 | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Transparent" "Queue"="Transparent" } | |
LOD 100 |
This file contains 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
;; origin | |
(let [walls (grid 2 2) | |
paths (reduce (fn [index [a b]] | |
(merge-with into index {a [b] b [a]})) | |
{} (map seq walls)) | |
start-loc (rand-nth (keys paths))] | |
(loop [walls walls | |
unvisited (disj (set (keys paths)) start-loc)] | |
(if-let [loc (when-let [s (seq unvisited)] (rand-nth s))] | |
(let [walk (iterate (comp rand-nth paths) loc) |
This file contains 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
(ns example | |
(:require | |
[cloroutine.core :refer [cr]])) | |
;; ref: https://github.com/leonoel/cloroutine | |
(def ^:dynamic *tail*) | |
(defn gen-seq [gen] | |
(binding [*tail* (lazy-seq (gen-seq gen))] |
This file contains 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
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class StatsBarAttribute : PropertyAttribute | |
{ | |
public string valueMax; | |
public StatsBarColor color; | |
public StatsBarAttribute(string valueMax = null, StatsBarColor color = StatsBarColor.Red) |
This file contains 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
# ref : https://stackoverflow.com/questions/5189699/how-to-make-a-class-property | |
class ClassPropertyDescriptor(object): | |
def __init__(self, fget, fset=None): | |
self.fget = fget | |
self.fset = fset | |
def __get__(self, obj, klass=None): | |
if klass is None: | |
klass = type(obj) |
This file contains 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
#region AutoGenerated | |
public class DataQHello | |
{ | |
public int A { get; set; } | |
} | |
public class DataRHello | |
{ | |
public int A { get; set; } | |
} |
This file contains 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
var comp = SyntaxFactory.CompilationUnit().AddMembers( | |
SyntaxFactory.NamespaceDeclaration(SyntaxFactory.IdentifierName("ACO")) | |
.AddMembers( | |
SyntaxFactory.ClassDeclaration("MainForm") | |
.AddMembers( | |
SyntaxFactory.PropertyDeclaration(SyntaxFactory.ParseTypeName("System.Windows.Forms.Timer"), "Ticker") | |
.AddAccessorListAccessors( | |
SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken)), | |
SyntaxFactory.AccessorDeclaration(SyntaxKind.SetAccessorDeclaration).WithSemicolonToken(SyntaxFactory.Token(SyntaxKind.SemicolonToken))), | |
SyntaxFactory.MethodDeclaration(SyntaxFactory.ParseTypeName("void"), "Main") |
- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory
The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.
If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:
pdb2mdb MyLibrary.dll
Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.
NewerOlder