This file contains hidden or 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
| // Unlit texture shader which casts shadow on Forward/Defered | |
| Shader "Unlit/Texture CastShadow" { | |
| Properties { | |
| _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} | |
| } | |
| SubShader { | |
| Tags {"Queue"="Opaque" } | |
| LOD 100 |
This file contains hidden or 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
| s = "山賀琴子ことこ" | |
| output = "" | |
| 140.times{ | |
| index = rand(s.length) | |
| add_s = s[index] | |
| output = output + add_s | |
| } |
This file contains hidden or 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 UnityEngine.UI; | |
| using UnityEditor; | |
| // Assets/Editorに置く | |
| public class UIExtension { | |
| // Textのフォントなどの設定 | |
| [MenuItem ("Tools/UI/SetText")] |
This file contains hidden or 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.Generic; | |
| using UnityEngine; | |
| using UnityEditor; | |
| namespace UnityEngine.UI{ | |
| public class MyText : Text{ | |
| #if UNITY_EDITOR |
This file contains hidden or 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
| //Inspectorに複数データを表示するためのクラス | |
| [System.SerializableAttribute] | |
| public class ValueList{ | |
| public List<int> List = new List<int>(); | |
| public ValueList(List<int> list){ | |
| List = list; | |
| } | |
| } |
This file contains hidden or 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 UnityEngine.UI; | |
| using System.Collections; | |
| public class Test : MonoBehaviour { | |
| public GameObject meshPrefab; | |
| public Transform cubeRoot; | |
| public InputField generateNum; |
This file contains hidden or 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; | |
| public class GyroScene : MonoBehaviour { | |
| public Transform target; | |
| private Quaternion initialRotation; | |
| private Quaternion gyroInitialRotation; |
This file contains hidden or 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
| /// <summary> | |
| /// | |
| /// </summary> | |
| using UnityEngine; | |
| using System; | |
| using System.Collections; | |
| [RequireComponent(typeof(Animator))] |
This file contains hidden or 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 DG.Tweening; | |
| // 逃げる子猫 | |
| public class Kitten : MonoBehaviour { | |
| private Animator animator; | |
| public float runDuration = 1.0f; |
This file contains hidden or 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
| foreach(var shape in expression.blendShapes.ToArray()){ | |
| GUILayout.BeginHorizontal("box"); | |
| GUILayout.BeginVertical(); | |
| var skin = shape.skin; | |
| // me | |
| skin = character.GetComponentsInChildren<SkinnedMeshRenderer> ().Where (s => s.sharedMesh.blendShapeCount > 0).First (); | |
| var name = shape.name; |