Skip to content

Instantly share code, notes, and snippets.

View TheStoneBook's full-sized avatar

Shunsuke_Ishimoto TheStoneBook

View GitHub Profile
@TheStoneBook
TheStoneBook / TestScript.cs.meta
Last active July 22, 2018 19:39
【Unity】Scriptのmetaファイル
fileFormatVersion: 2
guid: 3bb1273c56536430d91e4721e0b33957
timeCreated: 1532123250
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- tex: {fileID: 2800000, guid: f2f994c0d0f9b4a24b4c4615306b56ef, type: 3}
- mat: {fileID: 2100000, guid: 85382f3e5c1c44090ad7ed361a4baf5c, type: 2}
@TheStoneBook
TheStoneBook / TestImage.png.meta
Last active July 22, 2018 19:38
【Unity】画像ファイルのmetaファイル
fileFormatVersion: 2
guid: f2f994c0d0f9b4a24b4c4615306b56ef
timeCreated: 1532129949
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
@TheStoneBook
TheStoneBook / GetAngleAtTwoVector2.cs
Last active August 25, 2018 15:22
【Unity】2点間の角度取得
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GetAngleAtTwoVector2 : MonoBehaviour {
[SerializeField]
GameObject _start;
[SerializeField]
@TheStoneBook
TheStoneBook / GetAngleUpToClockWise.cs
Last active August 28, 2018 07:10
【Unity】2点間の角度取得(上方向から時計回り & 角度範囲0~360)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GetAngleUpToClockWise : MonoBehaviour {
[SerializeField]
GameObject _start;
[SerializeField]
@TheStoneBook
TheStoneBook / Reversible.shader
Created September 7, 2018 04:14
【Unity】表裏両面に別々のテクスチャを貼っつけるシェーダ【Shader】
Shader "Unlit/Reversible"
{
Properties
{
_MainTexA ("TextureA", 2D) = "white" {}
_MainTexB ("TextureB", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
@TheStoneBook
TheStoneBook / FaceExtrude.shader
Last active September 10, 2018 02:11
【Unity】ポリゴン面押し出し【Shader】
Shader "Geometry/FaceExtrude"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_Factor ("Factor", Range(0., 2.)) = 0.2
}
SubShader
{
Tags { "RenderType"="Opaque" }
@TheStoneBook
TheStoneBook / PolygonScaling.shader
Last active September 10, 2018 03:01
【Unity】ポリゴンの拡大縮小【Shader】
Shader "Geometry/PolygonScaling"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_MainColor("Color",Color)=(1,1,1,1)
_ScaleFactor("Scale Factor", Range(0.0, 1.0)) = 1.0
//_ScaleFactor("Scale Factor", Range(0.0, 2.0)) = 1.0
}
@TheStoneBook
TheStoneBook / PolygonToBoxel.shader
Last active September 18, 2018 18:01
【Unity】ポリゴンをボクセルに【Shader】
Shader "Geometry/PolygonToBoxel"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_MainColor("Color",Color)=(1,1,1,1)
_BoxScale("BoxScale",Range(0.0, 0.1)) = 0.01
}
SubShader
{
@TheStoneBook
TheStoneBook / GrayScale.shader
Last active October 9, 2018 15:17
【Unity】テクスチャグレイスケール変換【Shader】
Shader "Unlit/GrayScale"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
@TheStoneBook
TheStoneBook / TexBlend.shader
Last active October 9, 2018 16:47
【Unity】2つのテクスチャをブレンドする【Shader】
Shader "Unlit/TexBlend"
{
Properties
{
_MainTex ("MainTex", 2D) = "white" {}
_SubTex("SubTex", 2D) = "white" {}
_Blend("Blend", Range(0.0,1.0)) = 0.0
}
SubShader
{