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
Vector2 screenPos = camera.WorldToViewportPoint( worldPosition ); | |
screenPos.x *= guiCanvas.rect.width; | |
screenPos.y *= guiCanvas.rect.height; | |
// the element should be anchored bottom/left | |
uiElement.anchoredPosition = screenPos; |
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
// How to load in modules | |
const FaceTracking = require('FaceTracking'); | |
const D = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const TouchGestures = require('TouchGestures'); | |
const object = Scene.root.find("object"); | |
face.mouth.openness.monitor().subscribe(function(event) { | |
if(event.newValue > 0) { | |
object.transform.x = FaceTracking.face(0).cameraTransform.applyTo(FaceTracking.face(0).mouth.center).x; |
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
const D = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Patches = require('Patches'); | |
const FaceTracking = require('FaceTracking'); | |
const Shaders = require('Shaders'); | |
const R = require('Reactive'); | |
const Patchers = require('Patches'); | |
const face = FaceTracking.face(0); | |
const rect = Scene.root.find("rectangle0"); | |
const cam = Scene.root.find("Camera"); |
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
const Diagnostics = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Shaders = require('Shaders'); | |
const Materials = require("Materials"); | |
const R = require("Reactive"); | |
const CameraInfo = require('CameraInfo'); | |
const Textures = require('Textures'); | |
const mat = Materials.get("material0"); | |
const cameraTexture = Textures.get("cameraTexture0"); |
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
const Diagnostics = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Shaders = require('Shaders'); | |
const Materials = require("Materials"); | |
const R = require("Reactive"); | |
const CameraInfo = require('CameraInfo'); | |
const Textures = require('Textures'); | |
const Time = require('Time'); | |
const mat = Materials.get("material0"); | |
const cameraTexture = Textures.get("cameraTexture0"); |
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
#! /bin/bash | |
# This command converts audio according to the specifications listed in the Spark docs: | |
# https://sparkar.facebook.com/ar-studio/learn/documentation/docs/audio | |
# mono m4a, 44.1kHz sample rate, 16-bit-depth resolution | |
# Usage: | |
# convert-audio.sh myaudio.mp3 converted.m4a | |
# Notes: | |
# Always use m4a for output file type | |
# Change "64k" to a higher value to improve bitrate/quality. e.g. 96k 128k 192k |
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 com.mindshaft.overtime.collision; | |
using UnityEngine; | |
namespace com.mindshaft.overtime.physics { | |
public class RaycastCollisionDetection : IEntityCollisionDetection { | |
private BoxCollider _collider; | |
private Rect _collisionRect; | |
private LayerMask _collisionMask; | |
private LayerMask _playerMask; |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.XR.Interaction.Toolkit.AR; | |
public class CustomPlacementInteractable : ARPlacementInteractable | |
{ | |
ARObjectPlacementEventArgs m_ObjectPlacementEventArgs = new ARObjectPlacementEventArgs(); | |
void Update() |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace DictExperiments | |
{ | |
public static class DictExt | |
{ | |
public class SceneObjectParser : IDisposable |