24.09 Release - Editor crash if SpawnableScriptAssetRef contains invalid prefab #18483
Labels
kind/bug-2409
Used for stabilization/24.09 issues
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
sig/content
Categorizes an issue or PR as relevant to SIG Content.
Bug Description
If you have the multiplayer component enabled and have a prefab that has both .spawnable and .network.spawnable, trying to spawn using the script canvas SpawnableScriptAssetRef variable asset dialog selects the wrong prefab, generating a crash.
Assets-Required
prefab_and_script.zip
Steps to Reproduce
Expected Behavior
The asset selection dialog should allow for selection of spawnable or network.spawnable assets instead of defaulting to the asset name. Also, if the asset is not correctly selected (doesn't end in spawnable or network.spawnable) the editor should not crash.
Actual Behavior
Crash at line 117 in SpawnableScriptMediator::SpawnAndParentAndTransform
TransformComponent* entityTransform = containerEntity->FindComponent(); // containerEntity is nullptr or invalid thus generating a crash.
Screenshots/Videos
Found In Branch
24.09.1 release
Commit ID From
da3e1d3
Desktop/Device
PC Windows 11 Pro
AMD Ryzen 5800H
16 GB RAM
Nvidia RTX 3070.
Additional Context
No response
The text was updated successfully, but these errors were encountered: