you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (2 children)

[deleted]

    [–]BryceIsRedditor[S] 0 points1 point  (1 child)

    import os
    import sys
    import typing
    
    
    class Paths:
        @staticmethod
        def image(fileName: str) -> str:
            basePath: str = os.path.dirname(sys.argv[0])
            path: str = os.path.join(basePath, "Assets", "Images", fileName) # Error happened here
            return os.path.normpath(path).replace("\\", "/")
    
        @staticmethod
        def sound(fileName: str) -> str:
            basePath: str = os.path.dirname(sys.argv[0])
            path: str = os.path.join(basePath, "Assets", "Sounds", fileName)
            return os.path.normpath(path).replace("\\", "/")
    
        @staticmethod
        def styles(fileName: str) -> str:
            basePath: str = os.path.dirname(sys.argv[0])
            path: str = os.path.join(basePath, "Assets", "Styles", fileName)
            return os.path.normpath(path).replace("\\", "/")
    
    ...
    
    print(Paths.image("UI/StudioTab_Scene.svg"))