As title say, when printing the list of component found when I “GetComponentsByClass” with “ActorComponent”, the log gives:
LogBlueprintUserMessages: [LevelHandler_C_1] Prefab_Forest_TerrainPiece1.DefaultSceneRoot
LogBlueprintUserMessages: [LevelHandler_C_1] Prefab_Forest_TerrainPiece1.BillboardComponent_0
LogBlueprintUserMessages: [LevelHandler_C_1] Prefab_Forest_TerrainPiece1.Box
LogBlueprintUserMessages: [LevelHandler_C_1] Prefab_Forest_TerrainPiece1.CTerrainPiece
LogBlueprintUserMessages: [LevelHandler_C_1] Prefab_Forest_TerrainPiece1.StaticMesh Plane
While using the same node in the same blueprint, only replace “ActorComponent” with “CTerrainPiece”, it give me an empty array.
For context, I am trying to create an editor function by expose this function on details panel to find all actor in the level containing said component. The project currently just started and this is the only actor component in the entire project at this time.
The holder of the editor function mentioned is a different actor of a different class, trying to get hold of every reference of this component’s instances, a manager of sort.
Just wanted to know if this is a known issue and is there a workaround, thank you.
P/S: For additional information, when dragging the CTerrainPiece component from inside blueprint editor of actor Prefab_Forest_TerrainPiece1 to write a test function, this warning pop up when I try to pass reference of this component to a function.
LogScript: Warning: Accessed None trying to read property CTerrainPiece
Prefab_Forest_TerrainPiece1_C /Game/Levels/RunLevels/Forest.Forest:PersistentLevel.Prefab_Forest_TerrainPiece1_C_1
Function /Game/Levels/RunLevels/Prefabs/Prefab_TerrainPiece.Prefab_TerrainPiece_C:editor_FAssignReferences:00BC
Not entirely sure how this work, because unlike a variable, this is a component attach to an actor that exist in the level, and it tell me the component is ‘null’?
The actor contain this component is an instance of an actor blueprint I created in content browser. Warning pop up when I click on the button from ‘details’ panel of the object in game world (not from the blueprint).