maji-git / multiplay-core

Develop Online, Multiple Controller and solo multiplayer game at once!
MIT License
115 stars 6 forks source link

Fix hacky way of checking if scene exists. #25

Closed maji-git closed 2 days ago

maji-git commented 2 weeks ago

At this line: https://github.com/maji-git/multiplay-core/blob/main/addons/MultiplayCore/MultiPlay.gd#L715-L718

    if !FileAccess.file_exists(scene_path):
        if !FileAccess.file_exists(scene_path + ".remap"):
            MPIO.logerr("Target scene doesn't exist")
            return

This approach works, but it's hacky, and Godot already has API for checking it properly. See ResourceLoader.exists() .

maji-git commented 2 weeks ago

again, thanks TheMikirog for discovering the issue

maji-git commented 2 days ago

Fixed in https://github.com/maji-git/multiplay-core/commit/8bf1592c7634b22f4e3ede16c6524add7aff574f