| 255 | } |
| 256 | |
| 257 | void UMjSimulateWidget::SetupDashboard(AAMjManager* InManager) |
| 258 | { |
| 259 | ManagerRef = InManager; |
| 260 | if (!ManagerRef) |
| 261 | return; |
| 262 | |
| 263 | PopulateManagerSettings(); |
| 264 | |
| 265 | // Populate Articulation Selector |
| 266 | if (ArticulationSelector) |
| 267 | { |
| 268 | ArticulationSelector->ClearOptions(); |
| 269 | TArray<AMjArticulation*> Articulations = ManagerRef->GetAllArticulations(); |
| 270 | for (AMjArticulation* Art : Articulations) |
| 271 | { |
| 272 | if (Art->bAttachFailed) |
| 273 | continue; |
| 274 | ArticulationSelector->AddOption(MjUtils::PrettifyName(Art->GetName())); |
| 275 | } |
| 276 | if (Articulations.Num() > 0) |
| 277 | { |
| 278 | ArticulationSelector->SetSelectedIndex(0); |
| 279 | } |
| 280 | else |
| 281 | { |
| 282 | // If no articulations found, we still need to build the base UI (Physics, Visuals, Replay etc) |
| 283 | RefreshArticulationControls(); |
| 284 | } |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | void UMjSimulateWidget::NativeTick(const FGeometry& MyGeometry, float InDeltaTime) |
| 289 | { |
nothing calls this directly
no test coverage detected