You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #93583 from smix8/obstacle_monitor
Add navigation obstacles to performance monitor stats
This commit is contained in:
@@ -91,6 +91,7 @@ void Performance::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(NAVIGATION_EDGE_MERGE_COUNT);
|
||||
BIND_ENUM_CONSTANT(NAVIGATION_EDGE_CONNECTION_COUNT);
|
||||
BIND_ENUM_CONSTANT(NAVIGATION_EDGE_FREE_COUNT);
|
||||
BIND_ENUM_CONSTANT(NAVIGATION_OBSTACLE_COUNT);
|
||||
BIND_ENUM_CONSTANT(MONITOR_MAX);
|
||||
}
|
||||
|
||||
@@ -141,6 +142,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
|
||||
PNAME("navigation/edges_merged"),
|
||||
PNAME("navigation/edges_connected"),
|
||||
PNAME("navigation/edges_free"),
|
||||
PNAME("navigation/obstacles"),
|
||||
|
||||
};
|
||||
|
||||
@@ -225,6 +227,8 @@ double Performance::get_monitor(Monitor p_monitor) const {
|
||||
return NavigationServer3D::get_singleton()->get_process_info(NavigationServer3D::INFO_EDGE_CONNECTION_COUNT);
|
||||
case NAVIGATION_EDGE_FREE_COUNT:
|
||||
return NavigationServer3D::get_singleton()->get_process_info(NavigationServer3D::INFO_EDGE_FREE_COUNT);
|
||||
case NAVIGATION_OBSTACLE_COUNT:
|
||||
return NavigationServer3D::get_singleton()->get_process_info(NavigationServer3D::INFO_OBSTACLE_COUNT);
|
||||
|
||||
default: {
|
||||
}
|
||||
@@ -272,6 +276,7 @@ Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const
|
||||
MONITOR_TYPE_QUANTITY,
|
||||
MONITOR_TYPE_QUANTITY,
|
||||
MONITOR_TYPE_QUANTITY,
|
||||
MONITOR_TYPE_QUANTITY,
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ public:
|
||||
NAVIGATION_EDGE_MERGE_COUNT,
|
||||
NAVIGATION_EDGE_CONNECTION_COUNT,
|
||||
NAVIGATION_EDGE_FREE_COUNT,
|
||||
NAVIGATION_OBSTACLE_COUNT,
|
||||
MONITOR_MAX
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user