Found a particularly nasty re-instancing bug with Blueprints and sub-levels. It appears that Blueprints in non-visible sub-levels (which are loaded) are not re-instanced correctly. I tracked down repro steps which I’ve tested in both 4.11 and 4.12 preview.
- Create a new map. Save it (Map_P)
- Add a sub level to Map_P (SubLevel)
- Change streaming method to Always Loaded for SubLevel
- SaveAll
- Create a new Blueprint based on Actor (BP_TestReinstance)
- Save the BP
- Add BP_TestReinstance to SubLevel
- Set SubLevel’s visibility to false (click the eye in the Levels window)
- SaveAll
- Open BP_TestReinstance
- Add a PointLight component as a child of the DefaultSceneRoot (PointLight)
- On “Event Tick” for BP_TestReinstance, use “Print String” to display PointLight’s AttenuationRadius
- Compile the Blueprint and Save (order may be important, so compile then save)
- Close the editor without saving SubLevel (very important!)
- Open the editor, open Map_P
- Enter PIE
The output window should be spammed with something to the effect of:
[2016.05.11-16.10.14:731][315]PIE:Error: Error Blueprint Runtime Error: Accessed None trying to read property PointLight from function: ‘ExecuteUbergraph_BP_TestReinstance’ from node: Print String in graph: EventGraph in object: BP_TestReinstance
[2016.05.11-16.10.14:731][315]LogBlueprintUserMessages: [BP_TestReinstance_86] 0.0
SubLevel still has an old version of the BP instanced (it doesn’t appear to have the PointLight component) but is using the newest version of the Blueprint. If you make the level visible, the placed object will be reinstanced and everything will work fine.