I’ve tested my blueprint in UE4.11 and now objects cannot be created any more from the Constructor script, but everything works fine, when I move the creation code to the EventGraph - Event BeginPlay. Has something changed in UE4.11. Can someone please explain?
The objects I am trying to create are just NULL-pointers and when I am trying to use them I get errors like:
PIE:Error: Error Cannot access ‘DESTROYED_B_MyObject_CHILDACTOR_358’. It is pending kill. Property: ‘CallFunc_Array_Get_Item’ from node Strike in graph ‘EventGraph’ in blueprint B_PlasmaSphere
This is an example of the constructor, where I store the object in LightningRef for later use. But the LightningRef is NULL.
This is an example of anothet constructor, where I store the objects in an array called PlasmaRefs for later use. But the PlasmaRefs[x] are all NULL.
The message log when running and trying to access the objects is:
Sample of the MessageLog:
LogBlueprintUserMessages: Early PlayInEditor Detection: Level '/Game/ProceduralLightning/Maps/LightningTest.LightningTest:PersistentLevel' has LevelScriptBlueprint '/Game/ProceduralLightning/Maps/LightningTest.LightningTest:PersistentLevel.LightningTest' with GeneratedClass '/Game/ProceduralLightning/Maps/LightningTest.LightningTest_C' with ClassGeneratedBy
'/Game/ProceduralLightning/Maps/LightningTest.LightningTest:PersistentLevel.LightningTest'
LogPlayLevel: PlayLevel: No blueprints needed recompiling
PIE: New page: PIE session: LightningTest (Feb 13, 2016, 12:28:42 PM)
LogLinker:Warning: Can't find file '/Game/Blueprints/MyCharacter'
LogLinker:Warning: Can't find file '/Game/Blueprints/MyCharacter'
LogUObjectGlobals:Warning: Failed to find object 'Class /Game/Blueprints/MyCharacter.MyCharacter'
LogPlayLevel: Creating play world package: /Game/ProceduralLightning/Maps/UEDPIE_0_LightningTest
LogPlayLevel: PIE: StaticDuplicateObject took: (0.027681s)
LogAIModule: Creating AISystem for world LightningTest
LogPlayLevel: PIE: World Init took: (0.000509s)
LogPlayLevel: PIE: Created PIE world by copying editor world from /Game/ProceduralLightning/Maps/LightningTest.LightningTest to /Game/ProceduralLightning/Maps/UEDPIE_0_LightningTest.LightningTest (0.028432s)
LogInit: XAudio2 using 'Speakers (Realtek High Definition Audio)' : 2 channels at 48 kHz using 32 bits per sample (channel mask 0x3)
LogInit: FAudioDevice initialized.
LogWorld: Game class is 'MyGameMode_C'
LogWorld: Bringing World /Game/ProceduralLightning/Maps/UEDPIE_0_LightningTest.LightningTest up for play (max tick rate 0) at 2016.02.13-11.28.42
LogWorld: Bringing up level for play took: 0.014534
LogScript:Warning: Cannot access 'DESTROYED_B_LightningMaster_ChildGun_C_CHILDACTOR_40'. It is pending kill. Property: 'LightningRef'
B_LightningGun_C /Game/ProceduralLightning/Maps/UEDPIE_0_LightningTest.LightningTest:PersistentLevel.B_LightningGun_C_0
Function /Game/ProceduralLightning/Examples/LightningGun/B_LightningGun.B_LightningGun_C:ExecuteUbergraph_B_LightningGun:012C
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildGun_C_CHILDACTOR_40'. It is pending kill. Property: 'LightningRef' from node Strike in graph 'EventGraph' in blueprint B_LightningGun
PIE: Info Play in editor start time for /Game/ProceduralLightning/Maps/UEDPIE_0_LightningTest 0.196
LogBlueprintUserMessages: Late PlayInEditor Detection: Level '/Game/ProceduralLightning/Maps/LightningTest.LightningTest:PersistentLevel' has LevelScriptBlueprint '/Game/ProceduralLightning/Maps/LightningTest.LightningTest:PersistentLevel.LightningTest' with GeneratedClass '/Game/ProceduralLightning/Maps/LightningTest.LightningTest_C' with ClassGeneratedBy '
/Game/ProceduralLightning/Maps/LightningTest.LightningTest:PersistentLevel.LightningTest'
LogBlueprintUserMessages: [B_PlasmaSphere_C_1] PlasmaRef Length=36
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_358'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_356'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_354'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_352'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_350'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_348'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_346'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_344'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_342'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_340'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_338'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere
PIE:Error: Error Cannot access 'DESTROYED_B_LightningMaster_ChildPlasma_C_CHILDACTOR_336'. It is pending kill. Property: 'CallFunc_Array_Get_Item' from node Strike in graph 'EventGraph' in blueprint B_PlasmaSphere