Skip to content

Instantly share code, notes, and snippets.

#include "colors.inc"
#include "shapes.inc"
#include "woods.inc"
#include "textures.inc"
#include "stones.inc"
camera{
location <0,0.5,-4>
look_at <0,0,0>
}
//ライト設定 Area Lights
Shader "FX/mmat" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
_Cutoff ("Alpha cutoff", Range(0,1)) = 0.5
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class button_idou : MonoBehaviour {
public GameObject player;
bool forwardmove;
bool backmove;
bool rightmove;
@bibinba
bibinba / webcam_for_material.cs
Last active October 27, 2017 11:03
webcamから取得した映像を任意のマテリアルのテクスチャにするコード。ThetaSにも使える
using UnityEngine;
using System.Collections;
public class webcam : MonoBehaviour {
public int Width = 1920;
public int Height = 1080;
public int FPS = 30;
public Material material;
WebCamTexture webcamTexture;
@bibinba
bibinba / gogounitychan.cs
Created November 15, 2017 09:34
マウスで左右に移動しつつ、前に進む。ぶつかったら戻る
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class go : MonoBehaviour {
public GameObject goal;
public AudioSource don;
// Use this for initialization
void Start () {
@bibinba
bibinba / keyinputchange.cs
Created November 15, 2017 13:28
キー入力でテキストや画像を変更したり、マテリアルの色を変えたりする。
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class key : MonoBehaviour {
public GameObject spoon;
public GameObject kagi;
public GameObject hasami;
public Text text;
public Image image;
public Sprite cock;
@bibinba
bibinba / winMR_controller_position.cs
Created December 28, 2017 11:18
MRTKでコントローラーのポジションをとって、VRコスプレのための手の位置にしたいけどできない
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_WSA && UNITY_2017_2_OR_NEWER
using System.Collections.Generic;
using UnityEngine.XR.WSA.Input;
#endif
namespace HoloToolkit.Unity
{
public class position : MonoBehaviour
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FrostweepGames.Plugins.GoogleCloud.SpeechRecognition.aa;
public class text3d : MonoBehaviour {
string text;
private GameObject textObject;
public Material textMaterial;
// Use this for initialization
@bibinba
bibinba / height_change.cs
Created February 1, 2018 13:19
大きさを変える
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using HoloToolkit.Unity.InputModule;
using UnityEngine.VR.WSA.Input;
public class height_change : MonoBehaviour,IInputClickHandler
{
public Text text;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class kill : MonoBehaviour {
public Animator death;
public ParticleSystem katana;
private int a;
// Use this for initialization
void Start () {