Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3404ee09ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[AsCommand( | ||
| name: 'generate:material', | ||
| description: 'Generate a new physics material', | ||
| )] | ||
| class GenerateMaterial extends Command |
There was a problem hiding this comment.
Register material generator in CLI bootstrap
Expose this command through the main CLI application; GenerateMaterial is added here, but bin/sendama still only registers the older command set in Application::addCommands(...), so sendama generate:material will not be discoverable and users will get an unknown-command error despite the new command class existing.
Useful? React with 👍 / 👎.
| $assetPath = is_string($asset['relativePath'] ?? null) | ||
| ? $asset['relativePath'] | ||
| : (is_string($asset['path'] ?? null) ? $asset['path'] : null); | ||
|
|
||
| return is_string($assetPath) && str_ends_with(strtolower($assetPath), '.material.php'); |
There was a problem hiding this comment.
Preserve .material.php suffix when renaming material assets
Update the rename normalization path to treat .material.php as a compound suffix. Material assets are now first-class (isMaterialAsset checks for .material.php), but resolveAssetFileNameSuffix() still preserves only .prefab.php and .scene.php, so renaming a material from the generic asset inspector can silently produce *.php and make it stop being recognized as a material asset by the editor/pickers.
Useful? React with 👍 / 👎.
This pull request adds first-class support for physics material assets throughout the project, including CLI generation, editor integration, and unit tests. The main changes include the introduction of a
GenerateMaterialcommand, a material file generation strategy, material asset handling in the editor, and comprehensive test coverage for the new features.Material Asset Support
GenerateMaterialcommand for CLI-based creation of physics material assets (src/Commands/GenerateMaterial.php)MaterialFileGenerationStrategyto standardize material asset file creation (src/Strategies/AssetFileGeneration/MaterialFileGenerationStrategy.php)MaterialWriterfor serializing and saving material asset data (src/Editor/MaterialWriter.php)MaterialReferenceInputControlfor referencing materials in the editor UI (src/Editor/Widgets/Controls/MaterialReferenceInputControl.php)Editor and Asset Panel Integration
src/Editor/Widgets/AssetsPanel.php) [1] [2]NewGamecommand creates aMaterialsdirectory within assets (src/Commands/NewGame.php, [1] [2]Testing and Validation
tests/Unit/CliAssetsDirectoryTest.php, [1] [2] [3];tests/Unit/AssetsPanelTest.php, [4];tests/Unit/EditorAssetSelectionTest.php, [5] [6] [7]Dependency Updates
composer.jsonto allow Symfony Console 8.x for broader compatibilityThese changes collectively enable robust creation, management, and editing of physics material assets in both CLI and editor workflows.