Skip to content
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 assert destroyed object #35

Merged
merged 1 commit into from
Feb 10, 2025
Merged

Fix assert destroyed object #35

merged 1 commit into from
Feb 10, 2025

Conversation

nowsprinting
Copy link
Owner

In the Editor, Unity overrides null checks for destroyed GameObjects to provide additional debugging visibility, meaning a destroyed GameObject reference is not null but will evaluate to false when cast to a bool. This is specific to the Editor's debugging environment.

In the Player, Unity optimizes GameObject management for performance and does not retain references to destroyed GameObjects in the same way. Once destroyed, the GameObject behaves like a standard object and becomes null.

https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-94884

> In the Editor, Unity overrides null checks for destroyed GameObjects to provide additional debugging visibility, meaning a destroyed GameObject reference is not null but will evaluate to false when cast to a bool. This is specific to the Editor's debugging environment.
>
> In the Player, Unity optimizes GameObject management for performance and does not retain references to destroyed GameObjects in the same way. Once destroyed, the GameObject behaves like a standard object and becomes null.

https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-94884
Copy link

Code Metrics Report

master (309b2f1) #35 (5d32aa8) +/-
Coverage 37.0% 37.0% 0.0%
Code to Test Ratio 1:3.2 1:3.2 +0.0
Test Execution Time 4m41s 4m41s 0s
Details
  |                     | master (309b2f1) | #35 (5d32aa8) | +/-  |
  |---------------------|------------------|---------------|------|
  | Coverage            |            37.0% |         37.0% | 0.0% |
  |   Files             |               30 |            30 |    0 |
  |   Lines             |              507 |           507 |    0 |
  |   Covered           |              188 |           188 |    0 |
+ | Code to Test Ratio  |            1:3.2 |         1:3.2 | +0.0 |
  |   Code              |             1381 |          1381 |    0 |
+ |   Test              |             4486 |          4501 |  +15 |
  | Test Execution Time |            4m41s |         4m41s |   0s |

Reported by octocov

@nowsprinting nowsprinting merged commit 358834e into master Feb 10, 2025
18 checks passed
@nowsprinting nowsprinting deleted the fix/assert_destroyed branch February 10, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant