rename player.json to player.ui to match bricks convention

This commit is contained in:
Hermes Agent 2026-06-21 17:58:12 +08:00
parent c69ec38dc3
commit bc9a732809
2 changed files with 6 additions and 6 deletions

View File

@ -78,8 +78,8 @@ final class PlayerBridge: ObservableObject {
engine = eng
// player.json
loadPlayerJSON(engine: eng)
// player.ui
loadPlayerUI(engine: eng)
//
registerEvents(engine: eng)
@ -91,13 +91,13 @@ final class PlayerBridge: ObservableObject {
setupTimeObserver()
}
// MARK: - JSON
// MARK: - UI
private func loadPlayerJSON(engine: BricksEngine) {
// Bundleplayer.json
private func loadPlayerUI(engine: BricksEngine) {
// Bundleplayer.ui
let bundle = Bundle.module
if let url = bundle.url(forResource: "player", withExtension: "json"),
if let url = bundle.url(forResource: "player", withExtension: "ui"),
let data = try? Data(contentsOf: url),
let json = String(data: data, encoding: .utf8) {
do {