Enum Version

    • Enum Constant Detail

      • V1

        @Deprecated
        public static final Version V1
        Deprecated.
        This version is deprecated and is only listed to support older projects
        First version of Godot.
        See Also:
        Godot 1.1
      • V2

        public static final Version V2
        Second version of Godot.
        • This version still uses the old files to create projects.
        • The new scene format was implemented.
        See Also:
        Godot 2
      • V3

        public static final Version V3
        Third version of Godot.
        • New project file was added.
        • The editor was redesigned.
        • Godot "CLI" was completely changed.
        See Also:
        Godot 3
      • V4

        public static final Version V4
        Future version of Godot. No information at this time.
      • UNKNOWN

        public static final Version UNKNOWN
        Unknown version. This option is only used to represent an error.
    • Field Detail

      • versionCode

        public final int versionCode
        Version code
      • projectFiles

        public final String[] projectFiles
        Project filenames
      • sceneExtensions

        public final String[] sceneExtensions
        Scene extensions
    • Method Detail

      • values

        public static Version[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Version c : Version.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Version valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getRecommended

        public static Version getRecommended()
        Get recommended version
        Returns:
        Returns a recommended version
      • getFromCode

        @Contract(pure=true)
        @NotNull
        public static @NotNull Version getFromCode​(int code)
        Get version from code name
        Parameters:
        code - Target code.
        Returns:
        Return a valid version or UNKNOWN if code is not valid