Skip to content

Instantly share code, notes, and snippets.

@nabesi777
nabesi777 / FadeInPlayableBehaviour.cs
Last active November 26, 2018 11:53
FadeInPlayableBehaviour
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using System;
using UnityEngine.UI; //UIを使用
// A behaviour that is attached to a playable
public class FadeInPlayableBehaviour : PlayableBehaviour
@nabesi777
nabesi777 / FadeInPlayableAsset .cs
Created November 26, 2018 10:52
FadeInPlayableAsset
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.UI;
[System.Serializable]
public class FadeInPlayableAsset : PlayableAsset
{
@nabesi777
nabesi777 / AlarmClock.cs
Created November 8, 2018 16:10
C# アラーム時計
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Media;
@nabesi777
nabesi777 / RotateFloor.cs
Created October 16, 2018 23:35
一定時間以上当たり判定があると回転するオブジェクト
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RotateFloor : MonoBehaviour
{
// Use this for initialization
void Start()
{
}
@nabesi777
nabesi777 / pause.cs
Created October 10, 2018 00:55
キャラクターの動きを一時的に止める
using System.Collections.Generic;
using UnityEngine;
using System;
class Trapcol : MonoBehaviour
{
public ChaCon2 CC; //”ChaCon2”スクリプトがアタッチされたPlayerをインスペクター上で格納
OnTriggerEnter(Collider collider)
{//トラップタグをもつオブジェクトへ当たった時
@nabesi777
nabesi777 / hole.shader
Created October 9, 2018 11:43
穴を作る シェードプログラミング
Shader "Custom/HideObject1" {
SubShader{
Tags { "RenderType" = "Opaque" "Queue" = "Geometry-1"}
Pass{
ColorMask 0 //描写しない
CGPROGRAM
#pragma vertex vert
@nabesi777
nabesi777 / BlendTreeTest.cs
Created October 5, 2018 07:27
BlendTreeTest用 MoveOnly
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BrendTreeTest : MonoBehaviour {
public float speed = 5;  //playerのスピード
private Rigidbody rb;
@nabesi777
nabesi777 / BlueToothCon2.cs
Created October 4, 2018 14:11
スマホ BlueToothコントローラー用スクリプト
using UnityEngine;
using System.Collections;
public class BlueToothCon2 : MonoBehaviour
{
private Animator anim;
private CharacterController characterController;
private Vector3 velocity;
private float jumpPower = 5f;
@nabesi777
nabesi777 / BlueTooth.cs
Created October 4, 2018 07:58
BlueToothコントローラー動作テストスクリプト
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Controll : MonoBehaviour {
// Use this for initialization
void Start () {
//スマホ画面上のXボタンを押すとアプリが終了
Input.backButtonLeavesApp = true;
@nabesi777
nabesi777 / Debag.cs
Created September 30, 2018 23:13
Unity デバッグ出力機能
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class DebugDisplayLog : MonoBehaviour
{
static public List<string> displayLog = new List<string>();
private void Start()
{