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 RayShooter : MonoBehaviour { | |
| public LayerMask hitLayerMask; // レイ判定するオブジェクトは限定する | |
| public float rayLength = 20.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
| void Start(){ | |
| StartCoroutine (Test ()); | |
| } | |
| IEnumerator Test(){ | |
| yield return new WaitForSeconds(1.0f); | |
| Show(); | |
| yield return new WaitForSeconds(1.0f); | |
| Hide(); | |
| } |
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; | |
| // Canvasにエフェクトをのせる | |
| public class CanvasEffector : SingletonMonoBehaviour<CanvasEffector> { | |
| public GameObject starEffect; | |
| public void Star(){ |
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; | |
| using DG.Tweening; | |
| // Screen Space - Overrayで使える2Dパーティクル | |
| [RequireComponent (typeof (CanvasGroup))] | |
| public class CanvasParticle : MonoBehaviour { |
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; |
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
| /// <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; | |
| 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
| 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
| //Inspectorに複数データを表示するためのクラス | |
| [System.SerializableAttribute] | |
| public class ValueList{ | |
| public List<int> List = new List<int>(); | |
| public ValueList(List<int> list){ | |
| List = list; | |
| } | |
| } |