Description

The nativized spawner receives an invalid reference from the non nativized actor and fails silently meaning the variable doesn't get set.

Additional info: This issue happens when using a pure and non pure getter. The issue does not happen if both the spawner and the spawned actor are both nativized The real example of how I found this is I use wrappers to cast animation instances to cut down on nodes in character BP actors and components. We tend to have a mixed or nativized and non nativized assets because we run into showstopping issues that are time consuming to investigate when all assets are nativized.

Confirmed in 4.24 MAIN @ CL 7223946 

Steps to Reproduce
  1. Create an actor component and add a bool variable called 'State'
  2. Create an actor and add the component and add some debug on the tick to show the value of the components 'state' var (I used a coloured debug sphere) 
  3. Add a getter function to the actor to return the component from the actor
  4. Create another actor called 'spawner' which uses 'spawnactor' to create the previous actor, then use the new reference to call the component getter function, use this reference to set the value of the 'state' boolean to true 
  5. Copy the spawner and enable 'packing->nativize' in one and make sure its disabled in the other 
  6. Now drag these both into a test map 
  7. In project settings set Nativization Method to "Exclusive"

Result: If you play the test map in the editor both spawned actors will show debug that confirms the 'State' variable is true If you play a fully packaged Win64 build the actor spawned by a nativized actor will not have its 'State' variable set to true

Sample project attached

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-76866 in the post.

8
Login to Vote

Won't Fix
ComponentUE - Gameplay
Affects Versions4.21.24.244.22.3
CreatedJul 5, 2019
ResolvedJun 17, 2021
UpdatedJun 17, 2021