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 void Sample_PlayerPrefs() | |
{ | |
PlayerPrefs.SetInt("key", 1); | |
PlayerPrefs.SetString("key", "sample"); | |
PlayerPrefs.SetFloat("key", 0.0f); | |
PlayerPrefs.Save(); | |
int sample_int = PlayerPrefs.GetInt("key"); | |
string sample_string = PlayerPrefs.GetString("key"); |
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
private const uint Count = 10;// 100 , 1000 | |
void Start() | |
{ | |
TimeMeasurement(MaesurementProcess1, "Sample1",100); | |
TimeMeasurement(MaesurementProcess2, "Sample2",100); | |
} | |
private void MaesurementProcess1() | |
{ |
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 UnityEngine.UI; | |
using UnityEngine.SceneManagement; | |
//フェードイン・アウトを行うクラス | |
public class FadeController : MonoBehaviour { | |
private static GameObject fadeCanvas; | |
private static Canvas canvas; |
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.Collections; | |
using System.Collections.Generic; | |
using System; | |
using UnityEngine; | |
public class Sample : MonoBehaviour | |
{ | |
//int → string に変換 | |
private string ConvertToString(int number) | |
{ |
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.Collections.Generic; | |
using UnityEngine; | |
public class Sample : MonoBehaviour | |
{ | |
public static T MaxValue<T>(params T[] values) | |
{ | |
var list = new List(); | |
list.AddRange(values); | |
list.Sort(); | |
return list[values.Length - 1]; |
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.Collections.Generic; | |
using UnityEngine; | |
using System.Linq; | |
public class Sample : MonoBehaviour | |
{ | |
public static T MaxValueLinq<T>(params T[] values) | |
{ | |
return values.Max(); | |
} |
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 static float map(float value, float start1, float end1, float start2, float end2) | |
{ | |
return (start2 + (end2 - start2) * ((value - start1) / (end1 - start1))); | |
} |
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; | |
public static Dictionary<int, string> getTextFileDataDic(string FilePath) | |
{ | |
string[] line = ((Resources.Load(FilePath, typeof(TextAsset)) as TextAsset).text).Split(char.Parse("\n")); | |
Dictionary<int, string> text = new Dictionary<int, string>(); | |
for (int i = 0; i < line.Length; i++) | |
{ | |
if (!string.IsNullOrEmpty(line[i])) |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class Sample : MonoBehaviour { | |
private Sprite image; | |
private Image draw; |
OlderNewer