Skip to content

Instantly share code, notes, and snippets.

View shiena's full-sized avatar

KOGA Mitsuhiro shiena

View GitHub Profile
@shiena
shiena / SteamVROverlayBuildHelper.cs
Last active November 11, 2018 08:47
Unity2017.4以前でSteamVRのオーバーレイアプリをビルドするときにopenvr_api.dllをビルドフォルダにコピーするヘルパースクリプト
#if !UNITY_2018_1_OR_NEWER
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.Callbacks;
public class SteamVROverlayBuildHelper
{
const string OpenVrApiDll = "openvr_api.dll";
[PostProcessBuild(1)]
@shiena
shiena / BuildHelper.cs
Created October 14, 2018 17:04
Unity2018.2+il2cpp+gRPCをAndroid/iOSでビルドする
#if UNITY_EDITOR_OSX
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
public class BuildHelper
{
@shiena
shiena / ApplyRenderPipeline.cs
Created September 12, 2018 08:36
Unityでシーン切り替え時にRenderPipelineAssetを切り替えるスクリプト
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Rendering;
[InitializeOnLoad]
public static class ApplyRenderPipeline
{
--------- beginning of main
07-01 16:22:42.482 1574 1676 I [OAR] PanelAppAnalytics: Panel render last: 7448ms avg: 1634ms for com.oculus.vrshell/com.oculus.vrshell.panels.anytimeui.AnytimeUIAndroidPanelService
07-01 16:22:42.885 1548 1548 I com.oculus.telemetry.TelemetryService: flushing collectors
07-01 16:22:42.888 1548 1548 D com.oculus.telemetry.TelemetryService: Event flushed: oculus_os_thermal {"build":"oculus\/vr_pacific\/pacific:7.1.2\/N2G48H\/27130.12430.180:user\/release-keys","flavor":"user","realtime_ms":791496,"uptime_ms":706259,"front_plate_temperature_min":33,"front_plate_temperature_max":36,"front_plate_temperature_total":1045,"front_plate_temperature_total_square":36425,"cpu_temperature_min":47,"cpu_temperature_max":52,"cpu_temperature_total":1569,"cpu_temperature_total_square":82515,"gpu_temperature_min":44,"gpu_temperature_max":49,"gpu_temperature_total":1398,"gpu_temperature_total_square":65242,"nb_samples":30}
07-01 16:22:43.202 1574 3819 I VrApi : FPS=72,Prd=26ms,Tear=0,Early=0
@shiena
shiena / UE4Memo.md
Last active January 7, 2018 17:13
UE4でワープ可能なPlayerをVR Templateから持ってくる方法
  1. 自分のプロジェクトを事前に作っておく
  2. コピー元の作業について
    1. VR Templateでプロジェクトを作る
    2. プロジェクト設定 -> エンジン -> インプットをエクスポートする
    3. VirtualRealityBP/Blueprints/MotionControllerPawn を右クリックしてアセットアクション -> 移行を選び、自分のプロジェクトの Content に移行する
  3. コピー先の作業について
    1. プロジェクト設定 -> エンジン -> インプットにインポートする
    2. 移行した MotionControllerPawn をマップに配置する
      1. MotionControllerPawn のZ座標を床のZ座標と同じ高さに修正する
  4. MotionControllerPawn の詳細の Auto Process PlayerPlayer0 に変更する
@shiena
shiena / github-for-unity-build-and-test.md
Last active August 22, 2017 14:59
GitHub for Unityを手抜きビルドとテスト

ビルド環境

この手順はWindowsを対象とする

前準備

How to Buildの通り

補足

@shiena
shiena / Sineus.cs
Last active June 6, 2018 14:09
UnityでProcedual Audio
/*
* refs
* http://tips.hecomi.com/entry/2014/11/11/021147
* http://d.hatena.ne.jp/nakamura001/20120724/1343148980
* https://gist.github.com/keijiro/3806478
* https://codepen.io/DavidSabine/pen/kyAlJ
* https://femurdesign.com/theremin/
*/
using UnityEngine;
@shiena
shiena / Main.java
Last active January 13, 2016 06:46
import io.vertx.core.json.JsonArray;
import io.vertx.redis.RedisOptions;
import io.vertx.rxjava.core.Vertx;
import io.vertx.rxjava.redis.RedisClient;
import rx.Observable;
public class Main {
public static void main(String[] args) {
Vertx vertx = Vertx.vertx();
RedisOptions options = new RedisOptions();
@shiena
shiena / Dockerfile
Last active November 4, 2015 02:07
docker-centos6-xfce
FROM centos:6
MAINTAINER Mitsuhiro Koga<shiena.jp@gmail.com>
ENV user ${user:-developer}
ENV host ${host:-192.168.99.1}
# Xfceのためにepelをインストール
# install_chrome.shのためにwgetをインストール
# gitをビルドするためにtar curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMakerをインストール
# 日本語環境、デスクトップ環境、開発環境、インターネットのためにgroupinstall