Skip to content

Instantly share code, notes, and snippets.

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");
private const uint Count = 10;// 100 , 1000
void Start()
{
TimeMeasurement(MaesurementProcess1, "Sample1",100);
TimeMeasurement(MaesurementProcess2, "Sample2",100);
}
private void MaesurementProcess1()
{
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
//フェードイン・アウトを行うクラス
public class FadeController : MonoBehaviour {
private static GameObject fadeCanvas;
private static Canvas canvas;
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
public class Sample : MonoBehaviour
{
//int → string に変換
private string ConvertToString(int number)
{
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];
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class Sample : MonoBehaviour
{
public static T MaxValueLinq<T>(params T[] values)
{
return values.Max();
}
public static float map(float value, float start1, float end1, float start2, float end2)
{
return (start2 + (end2 - start2) * ((value - start1) / (end1 - start1)));
}
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]))
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Sample : MonoBehaviour {
private Sprite image;
private Image draw;
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com自分のパッケージ名.fileprovider" <<--変更
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths"></meta-data>
</provider>