Hey,
I wonder if and how it is possible to refer to some actors from a blueprint at construct (for texture/location purposes) ?
Using “get actor of class” or “with tag” sometimes returns an error, or at least a warning. Using object picking do the same when passing into construct script. (“Warning: Accessed None trying to read property [actor]”)
Hey! - getallactors works for me in contruction. What are you doing?
If the warning comes and goes, then it’s a timing thing. I’m assuming the actor is not placed in the level?
I use “get actor of class” (and I am sure there is only one of this class). But sometimes (not each time) I’ve got a bunch of warnings saying that the reference isn’t valid.
As an example : I’ve got a “Vu_metre_BP” referencing a “ventilation_BP” (get actor of class “ventilation BP” then set as a variable). And last PIE I’ve got :
LogScript: Warning: Accessed None
trying to read property Ventilation_0
Vu_metre_BP_C /Engine/Transient.World_70:PersistentLevel.Vu_metre_BP_C_0
Function /Game/Assets/Blueprints/Vu_metre_BP.Vu_metre_BP_C:ExecuteUbergraph_Vu_metre_BP:112B
Such warning comes for every actor using a reference in the construction script.
I just retried a PIE and no more warning…
Yes there are all. But perhaps aren’t all the actors spawned in the same order each time ? I can’t add a delay node in the construction script… Do you know how the actor spawning is arranged ? Alphabetical order ? Location-based order ?
EDIT : I use level streaming, could it be a reason ?
Well moving all this in beginplay is possible, but I would like to see the effects of these codes in the editor when compiling (not only in PIE, since it’s a VR game, kinda annoying to look the things around each try). BUT I assume that is the best solution for now. I’ll try this.
I’m pretty sure you’re never going to find a spawn order. Does all this need to be in the construction? Can it be moved to begin play?
If you’re in the normal graph, then you have access to a lot more functionality.
I don’t think it’s streaming, I use it a lot. I do have problems with having to wait for things to appear, but I have coded that in ( wrote a while with a delay ).