Engine

Inherits: Object

Provides access to engine properties.

Description

The Engine singleton allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others.

Properties

int

max_fps

0

int

max_physics_steps_per_frame

8

float

physics_jitter_fix

0.5

int

physics_ticks_per_second

60

bool

print_error_messages

true

float

time_scale

1.0

Methods

String

get_architecture_name ( ) const

Dictionary

get_author_info ( ) const

Dictionary[]

get_copyright_info ( ) const

Dictionary

get_donor_info ( ) const

int

get_frames_drawn ( )

float

get_frames_per_second ( ) const

Dictionary

get_license_info ( ) const

String

get_license_text ( ) const

MainLoop

get_main_loop ( ) const

int

get_physics_frames ( ) const

float

get_physics_interpolation_fraction ( ) const

int

get_process_frames ( ) const

ScriptLanguage

get_script_language ( int index ) const

int

get_script_language_count ( )

Object

get_singleton ( StringName name ) const

PackedStringArray

get_singleton_list ( ) const

Dictionary

get_version_info ( ) const

String

get_write_movie_path ( ) const

bool

has_singleton ( StringName name ) const

bool

is_editor_hint ( ) const

bool

is_in_physics_frame ( ) const

Error

register_script_language ( ScriptLanguage language )

void

register_singleton ( StringName name, Object instance )

Error

unregister_script_language ( ScriptLanguage language )

void

unregister_singleton ( StringName name )


Property Descriptions

int max_fps = 0

  • void set_max_fps ( int value )

  • int get_max_fps ( )

The maximum number of frames per second that can be rendered. A value of 0 means "no limit". The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project logic and rendering.

Limiting the FPS can be useful to reduce system power consumption, which reduces heat and noise emissions (and improves battery life on mobile devices).

If