Skip to content

Instantly share code, notes, and snippets.

Shader "Custom/Shader" {
Properties {
// Inspectorから入力される値
_MaterialColor ("Color", Color) = (1,1,1,1)
_Sspec ("Specular Color", Color) = (1,1,1,1)
_Mgls ("Specular Index", Float) = 5
}
SubShader {
Pass {
Tags { "LightMode" = "ForwardBase" }
@Megumi3
Megumi3 / RayTest.cs
Last active August 29, 2015 14:27
RayTest
public class RayTest : MonoBehaviour {
public LayerMask mask;
void Ray() {
// 1.
// Rayの作成
Ray ray = new Ray(transform.position, transform.forward);
Ray mouseRay = Camera.main.ScreenPointToRay(Input.mousePosition);
@Megumi3
Megumi3 / RailTouchToMove
Last active August 29, 2015 14:22
test
using UnityEngine;
using System.Collections;
public class RailTouchToMove : MonoBehaviour {
Transform touchRailTransform;
Vector3 dragOffset;
RaycastHit hit;
@Megumi3
Megumi3 / gist:7723ba2e36f77ebd3483
Created May 26, 2015 15:45
Unity Navigation Test
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour {
NavMeshAgent agent;
RaycastHit hit;
Ray ray;