Skip to content

Instantly share code, notes, and snippets.

@onotchi
onotchi / FaceUpdate.cs
Last active May 11, 2017 12:08
プロ生ちゃんの表情を変化させる。
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace PronamaChan
{
public class FaceUpdate : MonoBehaviour
{
public SkinnedMeshRenderer SkinnedMeshRenderer;
@onotchi
onotchi / HairExtender.cs
Created May 11, 2017 12:12
プロ生ちゃんの髪を伸ばす
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEngine;
namespace PronamaChan
{
public class HairExtender : MonoBehaviour
{
//後髪上部伸縮値
@onotchi
onotchi / Program.cs
Created May 11, 2017 12:16
少し斜め上を行く俳句プログラミング
using System;
using System.Collections.Generic;
namespace HaikuProgram
{
internal class Program
{
private static void Main(string[] args)
{
while (true)
@onotchi
onotchi / EyeSettings.cs
Created May 11, 2017 12:21
プロ生ちゃんの瞳を操作する
using UnityEngine;
namespace PronamaChan
{
public class EyeSettings : MonoBehaviour
{
public Transform EyeL;
public Transform EyeR;
public SkinnedMeshRenderer SkinnedMesh;
public Material TransparentMaterial; //ハイライトを消すときの代替用マテリアル
@onotchi
onotchi / FaceUpdate2.cs
Created May 11, 2017 12:25
ユニティちゃんの表情を変化させる
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityChan
{
public class FaceUpdate2 : MonoBehaviour
{
public SkinnedMeshRenderer BlwDef;
public SkinnedMeshRenderer EyeDef;
@onotchi
onotchi / FaceUpdate.cs
Created May 11, 2017 12:26
中野シスターズの表情を変化させる
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace NakaSis
{
public class FaceUpdate : MonoBehaviour
{
public SkinnedMeshRenderer EyeBall;
public SkinnedMeshRenderer Face;
@onotchi
onotchi / ToonLit.shader
Created May 11, 2017 12:51
白枠を表示させるシェーダー
Shader "Onoty3D/Toon/Lit" {
Properties {
_Color ("Main Color", Color) = (0.5,0.5,0.5,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_Ramp ("Toon Ramp (RGB)", 2D) = "gray" {}
[Enum(OFF,0,FRONT,1,BACK,2)] _CullMode("Cull Mode", int) = 2 //OFF/FRONT/BACK
_StencilRefMain("Stcl Ref Main", Range(0, 255)) = 128
}
SubShader {
@onotchi
onotchi / SubMeshExporter.cs
Last active January 18, 2018 03:44
SubMesh単位でMeshを作り直す
using System.Linq;
using UnityEditor;
using UnityEngine;
public class SubMeshExporter : ScriptableObject
{
// Use this for initialization
private void Start()
{
}
@onotchi
onotchi / EyeRotator.cs
Created May 11, 2017 12:58
IK Passの間で目の回転を制御する
using UnityEngine;
public class EyeRotator : MonoBehaviour
{
public Vector3 RotationL;
public Vector3 RotationR;
private Animator _animator;
// Use this for initialization
@onotchi
onotchi / ChromaKey.shader
Created May 11, 2017 13:06
クロマキーシェーダー(RGBベースとHSVベース)
Shader "Onoty3D/ChromaKey" {
Properties{
_KeyColor("Key Color", Color) = (0,1,0)
_Near("Near", Range(0, 2)) = 0.2
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
}
SubShader{
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
LOD 200