Skip to content

Instantly share code, notes, and snippets.

View seiroise's full-sized avatar

seiroise

  • Kyoto, Japan
View GitHub Profile
@seiroise
seiroise / gist:ff80246d044f98018c3915373af6d34a
Created April 5, 2022 05:46
[Unity Editor拡張] script header
var s_obj = new SerializedObject(this);
EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.PropertyField(s_obj.FindProperty("m_Script"));
EditorGUI.EndDisabledGroup();
const port = 8888;
const http = require("http"), url = require("url"),
path = require("path"), fs = require("fs");
http.createServer(function(request, response) {
const uri = url.parse(request.url).pathname,
filename = path.join(process.cwd(), uri);
@seiroise
seiroise / RegexWindow.cs
Last active August 15, 2018 06:12
Hierarchy上の選択したGameObjectの名前を一括で変更する
#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Linq;
using System.Text.RegularExpressions;
namespace Seiro.Utils
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// ひたすら対象を見る
/// </summary>
[RequireComponent(typeof(Rigidbody))]
public class LookCamera : MonoBehaviour
{
@seiroise
seiroise / RGBSplit.shader
Last active May 4, 2022 06:56
RGB Separation Shader (Unity)
/*
RGB split shader
Built-inシェーダのvert_imgなどはここを参照のこと。
http://wiki.unity3d.com/index.php/Shader_Code
uvなどは頂点シェーダで計算したほうが軽くなりそう。
*/
Shader "Custom/RGBSplit" {
Properties {
<script id="worker" type="text/js-worker">
onmessage = function(e) {
console.log(e.data);
};
</script>
var MyModule = {};
MyModule.Webworkertest = pc.createScript('webworkertest');
MyModule.Webworkertest.prototype.initialize = function() {
if(window.Worker) {
var htmlAsset;
htmlAsset = this.app.assets.find('test.worker.html');
var div = document.createElement('div');
div.style.display = "none";
using UnityEngine;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// 調節用パラメータを表示
/// </summary>
public class Indicator : MonoBehaviour {
using UnityEngine;
using System.Collections;
/// <summary>
/// 移動させる
/// </summary>
public class Move : MonoBehaviour, IParameterIndicator {
[SerializeField] float speed;
using UnityEngine;
using System.Collections;
/// <summary>
/// 移動させる
/// </summary>
public class Move : MonoBehaviour {
[SerializeField] float speed;