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

24.09 Release - Editor crash if SpawnableScriptAssetRef contains invalid prefab #18483

Open
Hotshot5000 opened this issue Nov 18, 2024 · 0 comments
Assignees
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.

Comments

@Hotshot5000
Copy link

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

  1. Have a prefab that is both spawnable and network.spawnable (multiplayer gem must be enabled).
  2. Go to Script Canvas editor.
  3. Create SpawnableScriptAssetRef variable
  4. Open the dialog to select the asset
  5. select your multiplayer mesh prefab. Notice how it doesn't allow you to select .spawnable or network.spawnable submenu
  6. Notice how the name doesn't contain the .spawnable or .network.spawnable just the prefab name.
  7. Create a spawn ticket node and attach the variable to the Prefab connection.
  8. Run the script and observe how the whole editor process crashes.
  9. If you manually add the .network.spawnable extension to the dialog selected prefab everything works as expected

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

O3DE_script_generating_crash

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

@Hotshot5000 Hotshot5000 added kind/bug-2409 Used for stabilization/24.09 issues needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 18, 2024
@AMZN-daimini AMZN-daimini added sig/content Categorizes an issue or PR as relevant to SIG Content. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants