HearthSim / UnityPack

Python deserialization library for Unity3D Asset format
https://hearthsim.info/
MIT License
720 stars 153 forks source link

Runtime platform enum is outdated #72

Open digitalpbk opened 6 years ago

digitalpbk commented 6 years ago

I am using Unity version 2017.3.1f1

The following enums work correctly

class RuntimePlatform(IntEnum):
    StandaloneOSXUniversal = 2
    StandaloneOSXIntel = 4
    StandaloneWindows = 5
    WebPlayer = 6
    WebPlayerStreamed = 7
    iOS = 9
    PS3 = 10
    XBOX360 = 11
    Android = 13
    StandaloneLinux = 17
    StandaloneWindows64 = 19
    WebGL = 20
    WSAPlayer = 21
    StandaloneLinux64 = 24
    StandaloneLinuxUniversal = 25
    WP8Player = 26
    StandaloneOSXIntel64 = 27
    BlackBerry = 28
    Tizen = 29
    PSP2 = 30
    PS4 = 31
    PSM = 32
    XboxOne = 33
    SamsungTV = 34
    N3DS = 35
    WiiU = 36
    tvOS = 37
    Switch = 38

I am not sure as of which Unity version the enum changed, does someone know how to switch the enum based on the generator_version?