-
-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Issue #1021 - PhysicsProcessor ParentScene may be initialized to null #2262
fix: Issue #1021 - PhysicsProcessor ParentScene may be initialized to null #2262
Conversation
…thub.com/dloe/stride_fork into Issue1021_PhysicProcessorParentScene_Bug
@dotnet-policy-service agree |
I think it would be more appropriate to move that logic above the following line: https://github.com/stride3d/stride/blob/master/sources/engine/Stride.Physics/Engine/PhysicsProcessor.cs#L106 |
Moved parentScene assignment to RenderColliderShapes.
Makes sense, thanks for the suggestion, I did a new push with this change. |
Sorry, I should have specified that you should only conditionally assign that parentScene if none was provided by the user before that call, so something like: parentScene ??= Services.GetSafeServiceAs<SceneSystem>().SceneInstance.RootScene; Users may have set the |
Thanks ! |
PR Details
Description
This change is to address issue # 1021 - PhysicsProcessor ParentScene may be initialized to null.
The change was made in PhysicsProcessor.cs at line 160, where I added a check to see if ParentScene is null, and if so assign the entity scene to ParentScene.
Related Issue
#1021
Motivation and Context
The issue was raised because when using the debug physics shape script, the colliders were not being displayed after pressing ctrl+shift+p at runtime. To verify that this change solves the issue:
Types of changes
Checklist