unity技巧备忘

unity技巧备忘

在编辑器,检视面板 中执行代码

using UnityEngine;
public class HighScore : MonoBehaviour
{    
public bool resetHighScoreNow = false;private void OnDrawGizmos(){if (resetHighScoreNow){resetHighScoreNow = false;Debug.LogWarning("PlayerPrefs HighScore reset to 1,000.");}}
}