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.");
        }
    }
}
posted @ 2025-11-01 18:11  Gh0st2ongZi  阅读(1)  评论(0)    收藏  举报