diff --git a/Unity Studio/Unity Studio Classes/AssetsFile.cs b/Unity Studio/Unity Studio Classes/AssetsFile.cs index 1aa0387..160d023 100644 --- a/Unity Studio/Unity Studio Classes/AssetsFile.cs +++ b/Unity Studio/Unity Studio Classes/AssetsFile.cs @@ -220,54 +220,7 @@ namespace Unity_Studio assetsFileReader.endian = EndianType.LittleEndian; } - switch (platform) - { - case -2: - platformStr = "Unity Package"; - break; - case 4: - platformStr = "OSX"; - break; - case 5: - platformStr = "PC"; - break; - case 6: - platformStr = "Web"; - break; - case 7: - platformStr = "Web streamed"; - break; - case 9: - platformStr = "iOS"; - break; - case 10: - platformStr = "PS3"; - break; - case 11: - platformStr = "Xbox 360"; - break; - case 13: - platformStr = "Android"; - break; - case 16: - platformStr = "Google NaCl"; - break; - case 19: - platformStr = "CollabPreview"; - break; - case 21: - platformStr = "WP8"; - break; - case 25: - platformStr = "Linux"; - break; - case 29: - platformStr = "Wii U"; - break; - default: - platformStr = "Unknown Platform"; - break; - } + platformStr = Enum.TryParse(platform.ToString(), out BuildTarget buildTarget) ? buildTarget.ToString() : "Unknown Platform"; int baseCount = assetsFileReader.ReadInt32(); for (int i = 0; i < baseCount; i++) diff --git a/Unity Studio/Unity Studio Classes/UnityEnum.cs b/Unity Studio/Unity Studio Classes/UnityEnum.cs index 92e4835..b011904 100644 --- a/Unity Studio/Unity Studio Classes/UnityEnum.cs +++ b/Unity Studio/Unity Studio Classes/UnityEnum.cs @@ -96,4 +96,40 @@ namespace Unity_Studio GCADPCM, ATRAC9 } + + public enum BuildTarget + { + StandaloneOSX = 2, + StandaloneOSXIntel = 4, + StandaloneWindows, + WebPlayer, + WebPlayerStreamed, + iOS = 9, + PS3, + XBOX360, + Android = 13, + StandaloneLinux = 17, + StandaloneWindows64 = 19, + WebGL, + WSAPlayer, + StandaloneLinux64 = 24, + StandaloneLinuxUniversal, + WP8Player, + StandaloneOSXIntel64, + BlackBerry, + Tizen, + PSP2, + PS4, + PSM, + XboxOne, + SamsungTV, + N3DS, + WiiU, + tvOS, + Switch, + iPhone = -1, + BB10 = -1, + MetroPlayer = -1, + NoTarget = -2 + } }