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
public class Player : MonoBehabiour { | |
public void Start() | |
{ | |
// 物体の停止 | |
rigidbody.velocity = Vector3.zero; // 3Dの場合 | |
rigidbody2D.velocity = Vector2.zero; // 2Dの場合 | |
} | |
} |
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
[Ll]ibrary/ | |
[Tt]emp/ | |
[Oo]bj/ | |
# Autogenerated VS/MD solution and project files | |
*.csproj | |
*.unityproj | |
*.sln | |
*.pidb |
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; | |
using UnityEngine; | |
[System.SerializableAttribute] | |
public class MyData : ICloneable{ | |
public enum Type{ | |
NONE, | |
LEFT, | |
RIGHT | |
} |
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.Collections.Generic; | |
public class MyDataSet : ScriptableObject | |
{ | |
public List<MyData> list = null; | |
void OnEnable() | |
{ |
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 UnityEditor; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class MyDataEditor : EditorWindow { | |
public static MyDataSet _data; | |
public static int selected = -1; | |
public static Vector2 scrollPos; |
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 UnityEditor; | |
using System.IO; | |
/// <summary> | |
/// テクスチャを分割する | |
/// </summary> | |
public class SplitTexture : EditorWindow { |
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; | |
/// <summary> | |
/// AudioSourceの無音を削除してループ再生するサンプル | |
/// </summary> | |
[RequireComponent(typeof(AudioSource))] | |
public class AudioRemoveZeroVolume : MonoBehaviour { | |
AudioSource audioSource; |
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 UnityEditor; | |
/// <summary> | |
/// タイムスケールをショートカットキーで変更するコマンド | |
/// </summary> | |
public class ChangeTimeScale { | |
[MenuItem ("Window/TimeScale/ × 2 %#RIGHT")] | |
public static void TimeScale2X () { |
OlderNewer