Skip to content

Instantly share code, notes, and snippets.

View GOROman's full-sized avatar
😀
Good

GOROman GOROman

😀
Good
  • XVI Inc.
  • Japan
  • 01:16 (UTC +09:00)
  • X @GOROman
View GitHub Profile
@yoshitaka-xvi
yoshitaka-xvi / ProjectionMatrixSetter.cs
Created September 5, 2017 04:20
Unity 2017.2.0b10で、Immersiveヘッドセット向け描画でNearClipとFarClipを変更するためのUnityコンポーネント
using UnityEngine;
public class ProjectionMatrixSetter : MonoBehaviour {
Camera main;
[SerializeField]
float nearClip = 0.01f;
[SerializeField]
float farClip = 500.0f;
@codePrincess
codePrincess / .swift
Created August 2, 2017 15:39
Smooth doodling with coalesced touches
override public func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let touch = touches.first else {
return
}
UIGraphicsBeginImageContextWithOptions(bounds.size, false, 0.0)
let context = UIGraphicsGetCurrentContext()
image?.draw(in: bounds)
var touches = [UITouch]()
@flarb
flarb / VRInputModule.cs
Created August 20, 2014 22:27
Lets you use a VR world space cursor with World Space Canvases in Unity3D 4.6. Add this to the EventSystem object. Put some box colliders on your buttons in the World Space Canvas. Then, do a trace to see if you're looking at a menu object--if the trace hits one of those buttons, pass it to SetTargetObject. See ralphbarbagallo.com for a longer e…
using UnityEngine;
using UnityEngine.EventSystems;
//by Ralph Barbagallo
//www.flarb.com
//www.ralphbarbagallo.com
//@flarb
public class VRInputModule : BaseInputModule {
using UnityEngine;
using System.Collections;
#if UNITY_EDITOR
using UnityEditor;
[InitializeOnLoad]
// 大草原クラス
class WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
{