I’m turning the Sky_Sphere BP into a C++ class in order to make certain gameplay events less complicated to repeatedly script in BP’s. I was wondering- the directional light actor that is referenced in the BP is an actor, not a component. So it looks as if the variable in the BP that references it would not be a subobject pointer in C++. Infact the directional light actor doesn’t appear in the components section of the BP. In order to do the same thing in C++, do I just spawn a directional light actor in the constructor and manipulate it within the class?
It inherits from Actor- I’m making a C++ class that inherits from actor too. Was thinking that you cant spawn an actor inside of a constructor. So it would have to spawn at beginplay, which would probably mean that it wouldn’t be visible in the editor, as it is with the BP.
Ah ok, you want to know where the DirectionalLightActor is Set. If you look close, it’s set to editable. If you select it in the scene outline, you can see it’s options on the right side.
However, it doesnt update when I try and put a directional light in it, in the editor blueprint. If I dont have EditDefaultsOnly, then it’s greyed out. Am I doing something wrong? Thanks!
That didnt work. The strange thing is that after your answer, I made a variable in the persistent levelscriptactor for the skydome. I went into edit defaults on the level blueprint and set it to the skydome bp, works no problem. It only seems to be a problem with the light actor…
After that, i compiled the game (DebugGame Editor) and created a Blueprint from my new made Class. Then i placed it into my scene. After that, i searched it inside my Scene Outliner and selected it.
After this, i found my variable that i created in the options tab right under the scene outliner, clicked on it and selected the alread placed “DirectionalLightStationary”.
Did you place your BP inside your scene and tried to change the variable or did you, by mistake, tried to change the variable in the DefaultsTab of the BP itself?
I’ve followed all of those steps except that the variable is only visible in the BP by clicking “show inherited variables”. Even if I create a new BP from the class, the variable is not visible under the scene outliner. I’m trying to see what I’ve done thats different…
Ok its working- I think the change to EditAnywhere solved it, but then I was looking at the old compiled version by mistake. Thanks alot for your patience!!