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
import UnityEngine | |
import UnityEditor | |
import System | |
import System.IO | |
// C# の例 | |
// プロジェクト ウィンドウの選択されたオブジェクトからアセットバンドルを作成 | |
// コンパイルした後は "Menu" -> "Assets" へ移動して選択肢から一つを選択して | |
// アセットバンドルをビルド | |
class BuildAssetBundle: |
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 UnityEditor; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Linq; | |
public class VisualStudioProjectPostProcess : AssetPostprocessor { | |
public static void OnGeneratedCSProjectFiles() { | |
GenerateSoultion(); | |
} |
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
"Display | |
gui | |
" 透明度 | |
set transparency=220 | |
colorscheme koehler | |
syntax on "シンタックスカラーリングを設定する | |
set number "行番号を表示する | |
set title "編集中のファイル名を表示する | |
set showcmd "入力中のコマンドを表示する | |
set ruler "座標を表示する |
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 System.Collections; | |
using System; | |
public class MaskPattern : MonoBehaviour { | |
[Tooltip("マスクパターンを実装するシェーダを持つマテリアル")] | |
public Material mat; | |
[Tooltip("マスク。3x3の部分しか使用しない。")] | |
public Matrix4x4 matrix; | |
[Tooltip("基本的にはマスク数の9、適用しないマスク値0の分の明度が必要な場合等で変更。")] |
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
Shader "Custom/BlurVF" { | |
Properties{ | |
_MainTex("Texture", 2D) = "white" {} | |
_Diff("Diff", Range(0, 1)) = 0.1 | |
} | |
SubShader{ | |
Pass{ | |
CGPROGRAM | |
#pragma fragment frag |
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
Shader "Custom/SepiaVF"{ | |
Properties{ | |
_MainTex("Main", 2D) = "black"{} | |
} | |
SubShader{ | |
Lighting Off | |
Pass{ | |
CGPROGRAM |
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 MBLDefine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
/// <summary> | |
/// 入力によるイベントを管理する | |
/// </summary> |
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 System.Linq; | |
using UnityEngine; | |
public class PostEffect : MonoBehaviour | |
{ | |
public Material mat; |
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
Shader "Custom/DynamicVF" { | |
Properties{ | |
_MainTex("Texture", 2D) = "white"{} | |
} | |
SubShader{ | |
Pass{ | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
#include "UnityCG.cginc" |
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
Shader "Custom/TransEmissionVF" { | |
Properties{ | |
_MainTex("Texture", 2D) = "white"{} | |
_Emission("Emission", Range(0, 1)) = 0.1 | |
_RimWidth("RimWidth", Range(0.5, 5.0)) = 2 | |
} | |
SubShader{ | |
//Queue = Transparetとタグが付けられたオブジェクトのレンダリング順(キュー)が最後の方に回される | |
//そうしないと半透明にならないため |