Shader "MaterialPropertyDrawer"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
[HideInInspector] _MainTex2("Hide Texture", 2D) = "white" {}
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
public class MyBehavior : MonoBehaviour { | |
// This will store the string value | |
[StringInList("Cat", "Dog")] public string Animal; | |
// This will store the index of the array value | |
[StringInList("John", "Jack", "Jim")] public int PersonID; | |
// Showing a list of loaded scenes | |
[StringInList(typeof(PropertyDrawersHelper), "AllSceneNames")] public string SceneName; | |
} |
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
// Copyright (c) 2012 Calvin Rien | |
// http://the.darktable.com | |
// | |
// This software is provided 'as-is', without any express or implied warranty. In | |
// no event will the authors be held liable for any damages arising from the use | |
// of this software. | |
// | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it freely, | |
// subject to the following restrictions: |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ToonMotion : MonoBehaviour | |
{ | |
private class Snapshot | |
{ | |
public Transform transform; | |
public Vector3 position; |
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
// Originally written by Jason Booth https://gist.github.com/slipster216/3eec15c240066277e69e065a90e1f9fe | |
// Updated by Andrew Ferguson, April 2019. | |
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' | |
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' | |
Shader "Custom/GridShader" { | |
Properties | |
{ |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
//------------------------------------- | |
// simple ink paintスクリプト | |
// ColliderとRendererは必要 | |
[RequireComponent(typeof(Renderer))] | |
[RequireComponent(typeof(Collider))] | |
public class SimpleInkPaint : MonoBehaviour { |
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 "Unlit/SimpleInkPaint" | |
{ | |
Properties{ | |
_MainTex("MainTex", 2D) = "white" // メインテクスチャ | |
_Brush("Brush", 2D) = "white" // ブラシテクスチャ | |
_BrushScale("BrushScale", FLOAT) = 0.1 // ブラシサイズ | |
_ControlColor("ControlColor", VECTOR) = (0, 0, 0, 0) // ブラシの色 | |
_PaintUV("Hit UV Position", VECTOR) = (0, 0, 0, 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ColorRotator : MonoBehaviour { | |
public GameObject objHSV, objPlainColor; | |
private Material objHSVMaterial, objPlainColorMaterial; | |
private float timeDelta; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ColorRotator : MonoBehaviour { | |
public GameObject objHSV, objPlainColor; | |
private Material objHSVMaterial, objPlainColorMaterial; | |
private float timeDelta; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ColorRotator : MonoBehaviour { | |
public GameObject objHSV, objPlainColor; | |
private Material objHSVMaterial, objPlainColorMaterial; | |
private float timeDelta; |