标签:menuitem unity ini efs 调用 item void username let
using UnityEngine;
using System.Collections;
using UnityEditor;
/// <summary>
/// 开发测试用菜单工具。菜单项将会列出于 Editor 的菜单中,方便调用。
/// </summary>
public class DevUtility
{
[MenuItem("开发调试/清除登录信息")]
static void ClearLoginInfo()
{
PlayerPrefs.DeleteAll();
Debug.Log("清除完毕");
}
[MenuItem("开发调试/打印登录信息到控制台")]
static void PrintLoginInfo()
{
Debug.Log("username: " + PlayerPrefs.GetString("username", "NULL"));
Debug.Log("password: " + PlayerPrefs.GetString("password", "NULL"));
Debug.Log("user_id: " + PlayerPrefs.GetInt("user_id", -1));
Debug.Log("token: " + PlayerPrefs.GetString("token", "NULL"));
}
}
标签:menuitem unity ini efs 调用 item void username let
原文地址:http://www.cnblogs.com/0315cz/p/7993330.html