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
using UnityEngine; | |
using UnityEditor; | |
public enum TextureType { | |
NONE = -1, | |
GUI = 0, | |
CHARACTERS = 1 | |
} | |
public class AssetProcessing : AssetPostprocessor { |
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
// Triangle Subdivision based on http://wiki.unity3d.com/index.php?title=MeshHelper | |
// There is not smoothing of any sort, it will just divide the triangles | |
// hence the FlatSubdivide name | |
THREE.FlatSubdivide = function () { | |
}; | |
// Applies the "modify" pattern |
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
using UnityEngine; | |
using System; | |
using System.Collections; | |
public class AssetPathAttribute : PropertyAttribute { | |
System.Type type; | |
string label; | |
public bool isResource; | |
public AssetPathAttribute(string l, System.Type t, bool isR) { |
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
using System.Collections.Generic; | |
using System.Text; | |
namespace UnityEngine.EventSystems | |
{ | |
public abstract class PointerInputModule : BaseInputModule | |
{ | |
public const int kMouseId = -1; | |
public const int kFakeTouchesId = -2; |
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
using System; | |
using System.Collections.Generic; | |
using UnityEngine.Events; | |
// interface you implement in your MB to receive events | |
public interface ICustomHandler : IEventSystemHandler | |
{ | |
void OnCustomCode(CustomEventData eventData); | |
} |
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
//#define DEBUG_THREADING | |
using UnityEngine; | |
using System.Collections; | |
using System.Threading; | |
using System.Reflection; | |
public delegate IEnumerator MonitorCoroutine<T> (CoroutineData<T> data); |
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
using UnityEngine; | |
using System; | |
using System.Text; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text.RegularExpressions; | |
using System.Globalization; | |
using System.Security.Cryptography; | |
using System.IO; |
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
// Adjust dSYM generation | |
var xcodeProjectPath = Path.Combine(xcodeProjectDir, "Unity-iPhone.xcodeproj"); | |
var pbxPath = Path.Combine(xcodeProjectPath, "project.pbxproj"); | |
var sb = new System.Text.StringBuilder(); | |
var xcodeProjectLines = File.ReadAllLines(pbxPath); | |
foreach (var line in xcodeProjectLines) | |
{ | |
// Remove from OTHER_LDFLAGS |
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
// by dave @ beesandbombs.tumblr.com >:) | |
void setup() { | |
setup_(); | |
result = new int[width*height][3]; | |
result_ = new int[width*height][3]; | |
} | |
int[][] result, result_; | |
float time; |
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
mesh.clear(); | |
mesh.setMode(OF_PRIMITIVE_POINTS); | |
for(int x=0;x<640;x+=2) { | |
for(int y=0;y<480;y+=2) { | |
int index = x + y * 640; | |
short depth = kinect.getRawDepthPixelsRef().getPixels()[index]; | |
if(depth > minDistance && depth < maxDistance) { | |
Vector4 world = NuiTransformDepthImageToSkeleton(x,y,kinect.getRawDepthPixelsRef().getPixels()[index] << 3,NUI_IMAGE_RESOLUTION_640x480); | |
float scale = 500.0f; | |
mesh.addVertex(ofVec3f(world.x,world.y,-world.z)*scale); |