码迷,mamicode.com
首页 > 其他好文 > 详细

开发测试菜单工具,清除登录信息

时间:2017-12-06 18:15:11      阅读:207      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!