EnumComboBox() public static method

public static EnumComboBox ( Enum selected ) : Enum
selected Enum
return Enum
Esempio n. 1
0
    void OnOptionsView()
    {
        GUILayout.Space(10f);
        GUILayout.BeginHorizontal();
        needPackageScene = GUILayout.Toggle(needPackageScene, "With Package Scene");
        GUILayout.EndHorizontal();
        GUILayout.Space(10f);

        //版本号
        GUILayout.Space(10f);
        GUILayout.BeginHorizontal();
        GUILayout.Label("Main Version");
        mainVersion = GUILayout.TextField(mainVersion, 5);
        GUILayout.Label("Minor Version");
        minorVersion = GUILayout.TextField(minorVersion, 5);
        GUILayout.EndHorizontal();
        GUILayout.Space(10f);

        GUILayout.Space(10f);
        GUILayout.BeginHorizontal();
        switch (PackagePlatform.platformCurrent)
        {
        case PackagePlatform.PlatformType.Windows:
            textureFormatWin = (TextureFormatWindows)EditorGUIExtension.EnumComboBox("TextureFormat: ", textureFormatWin);
            break;

        case PackagePlatform.PlatformType.IOS:
            textureFormatIOS = (TextureFormatIOS)EditorGUIExtension.EnumComboBox("TextureFormat: ", textureFormatIOS);
            break;

        case PackagePlatform.PlatformType.Android:
            textureFormatAnd = (TextureFormatAndroid)EditorGUIExtension.EnumComboBox("TextureFormat: ", textureFormatAnd);
            break;

        case PackagePlatform.PlatformType.OSX:
            textureFormatOSX = (TextureFormatOSX)EditorGUIExtension.EnumComboBox("TextureFormat: ", textureFormatOSX);
            break;
        }
        GUILayout.EndHorizontal();
        GUILayout.Space(10f);
    }