This file contains 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 Timer : MonoBehaviour | |
{ | |
private float startTime; | |
public float second = 0; | |
void OnGUI () | |
{ |
This file contains 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 System; | |
public class Timer : MonoBehaviour | |
{ | |
private DateTime startTime; | |
public double second = 0; | |
void Start () |
This file contains 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 AlwaysAnimation : MonoBehaviour | |
{ | |
void Update () { | |
if( Time.timeScale == 0) | |
{ | |
animation[animation.clip.name].time = Time.realtimeSinceStartup % animation[animation.clip.name].length; | |
} |
This file contains 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 AddCount : MonoBehaviour | |
{ | |
[SerializeField] | |
Sample data; | |
void OnGUI () | |
{ |
This file contains 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.Text; | |
using UnityEditor; | |
using UnityEngine; | |
public class ExecuteShell | |
{ | |
static readonly string argment = "hoge.sh"; | |
static readonly int maxSize = 1048576; | |
[MenuItem("Edit/Execute %t")] |
This file contains 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
//www.texture : 0.16s | |
// www.textureNonReadable : 0.15s | |
// www.LoadImageIntoTexture : 0.12s | |
// Texture2D.LoadImage : 0.12s | |
using UnityEngine; | |
using System.Collections; | |
public class LoadTextureTest : MonoBehaviour | |
{ | |
float time; |
This file contains 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 LoadTextureTest : MonoBehaviour | |
{ | |
private delegate void WWWAction (WWW www); | |
private float time; | |
private Material _material; | |
private Texture2D tex2d; |
This file contains 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
Shader "User/Vertex Colored" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
} | |
SubShader { | |
Pass { | |
ColorMaterial AmbientAndDiffuse | |
Lighting On | |
SetTexture [_MainTex] { |
This file contains 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; | |
public class MovePlayer : MonoBehaviour { | |
NavMeshAgent agent; | |
void Start () { | |
agent = GetComponent<NavMeshAgent>(); | |
} | |
void Update () { |
This file contains 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; | |
public class MoveToTarget : MonoBehaviour { | |
public Transform target; | |
NavMeshAgent agent; | |
void Start () { | |
agent = GetComponent<NavMeshAgent>(); | |
} |