【问题标题】:unity) I deleted the game, but the PlayerPrefs are still thereunity)我删除了游戏,但 PlayerPrefs 仍然存在
【发布时间】:2021-05-31 13:40:33
【问题描述】:

环境

macOS 中的统一,macOS 游戏

问题

我删除了游戏并创建了一个新游戏。但是我删除的上一个游戏的 PlayerPrefs 仍然存在。如何清除构建文件的 PlayerPrefs?

我尝试过的事情

  • PlayerPrefs.DeleteAll()

这并没有按照我想要的方式工作。这仅删除了编辑器的 PlayerPrefs。这并没有删除构建文件的 PlayerPrefs。

  • Edit → Clear All Player Preferences

这并没有按照我想要的方式工作。这仅删除了编辑器的 PlayerPrefs。这并没有删除构建文件的 PlayerPrefs。

【问题讨论】:

    标签: unity3d


    【解决方案1】:

    如何清除构建文件的 PlayerPrefs?

    如果要删除它们,则需要删除文件,该文件位于独立播放器存储位置。

    对于 macOS,该位置为:

    ~/Library/Preferences/com.ExampleCompanyName.ExampleProductName.plist
    

    PlayerPrefs Documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-31
      • 2015-11-21
      • 1970-01-01
      相关资源
      最近更新 更多