いったん、localにクローンすると、画像とかもアップできるそう
http://tweeeety.hateblo.jp/entry/2015/08/31/140211
ImageのURLは、フルパスで入れないとダメみたい。。
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| using System.Collections; | |
| public class MassMeshes : MonoBehaviour | |
| { | |
| public Mesh origin; | |
| public int numMeshes; | |
| public Material drawMat; | |
| public bool castShadow = true; |
| using UnityEngine; | |
| using System.IO; | |
| using System.Collections; | |
| public class SaveData : MonoBehaviour | |
| { | |
| public int data1; | |
| public float data2; | |
| public string data3; |
| Shader "Hidden/ShikakuKirakira" | |
| { | |
| Properties | |
| { | |
| _Speed ("speed", Float) = 2 | |
| _Scale ("scale", Float) = 10 | |
| _Size ("size", Float) = 0.5 | |
| } | |
| CGINCLUDE | |
| #include "UnityCG.cginc" |
| var drag = Mathf.Exp(-_drag * deltaTime); |
| float2 d = _MainTex_TexelSize.xy; | |
| fixed4 c = tex2D(_MainTex, uv);//元のテクスチャ | |
| fixed4 o = tex2D(_Overlay, uv/(d*256));//feltのテクスチャが入る。uvが伸びないように調整してる | |
| //HSLを調整したかったら使ってもいいけど無視してもいい! | |
| float4 hslDelta = lerp(_HSL1, _HSL2, uv2.y); | |
| float3 hsl = RGBToHSL(c.rgb); | |
| hsl = saturate(hsl + hslDelta); | |
| half3 c2 = HSLToRGB(hsl.rgb); |
| #ifndef COLOR_COLLECT | |
| #define COLOR_COLLECT | |
| float3 rgb2hsv(float3 c) | |
| { | |
| float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
| float4 p = lerp(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g)); | |
| float4 q = lerp(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r)); | |
| float d = q.x - min(q.w, q.y); |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| static class Extensions | |
| { | |
| public static void LoadJsonFile<T> (T overwriteTarget, string filePath = "appData.json") |
| Shader "Unlit/UnlitCastShadow" | |
| { | |
| Properties | |
| { | |
| _MainTex("Texture", 2D) = "white" {} | |
| } | |
| CGINCLUDE | |
| #include "UnityCG.cginc" | |
| struct appdata |
いったん、localにクローンすると、画像とかもアップできるそう
http://tweeeety.hateblo.jp/entry/2015/08/31/140211
ImageのURLは、フルパスで入れないとダメみたい。。
| using UnityEngine; | |
| using UnityEditor; | |
| using System.IO; | |
| public class CreateCgincExtent{ | |
| [MenuItem("Assets/Create/cginc file")] | |
| public static void CreateCginc() | |
| { | |
| var path = GetCurrentProjectWindowPath(); | |
| path = Path.Combine(path, "newCginc.cginc"); |