# Why can't I select an actor from my scene?

**URL:** <https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, editor, UE4, CPP, Blueprint, question\
**Created:** [February 15, 2016, 3:17pm UTC](https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545 "2016-02-15T15:17:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_8d6a763f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8d6a763f](https://forums.unrealengine.com/u/anonymous_user_8d6a763f)\
**Post date:** [February 15, 2016, 3:17pm UTC](https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545/1 "2016-02-15T15:17:21Z")

</div>

Hello,  
When I try to select an actor from my scene to use in my c++ project, I see my actor in the browse menu, but when I click it, the property still says “None”. Here is the declaration of my pointer :

```
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyGame")
		ADirectionalLight* Sun;

```

 ![78636-2016-02-15-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/0/67098ca8460277223a902ede9463145fc0147e17.png)

This was working fine until last night, for no apparent reason. I went and tried to play my game, but the property no longer pointed to my directional light, and I couldn’t set it anymore. What could be the problem?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [February 16, 2016, 2:29pm UTC](https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545/2 "2016-02-16T14:29:22Z")

</div>

Hey-

What class are you adding your directional light component to? Is this going into a class based on actor, character, game mode, etc.? Can you post the class (.h and .cpp) where you’re creating the directional light component?

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8d6a763f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8d6a763f](https://forums.unrealengine.com/u/anonymous_user_8d6a763f)\
**Post date:** [February 16, 2016, 4:26pm UTC](https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545/3 "2016-02-16T16:26:41Z")

</div>

Hello ,

I am adding the component to a subclass of AGameMode. I am not creating the directional light through c++, I am adding it to my level through the editor. I need to access it from my custom game mode to make a day-night cycle.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [February 16, 2016, 5:43pm UTC](https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545/4 "2016-02-16T17:43:41Z")

</div>

Game mode is mainly used for setting the rules of how the game works. Since a day-night cycle would affect the level that you are playing in, the setup for the cycle would best fit in the Level Blueprint. Let me know if the following tutorial helps in setting up your cycle.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8d6a763f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8d6a763f](https://forums.unrealengine.com/u/anonymous_user_8d6a763f)\
**Post date:** [February 16, 2016, 5:49pm UTC](https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545/5 "2016-02-16T17:49:18Z")

</div>

Thanks for your answer, but I wanted to implement this system in c++ rather than in blueprints. Is there a way to do so, or do I have to put all the day-night cycle logic in the level blueprint?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2b03d27c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2b03d27c](https://forums.unrealengine.com/u/anonymous_user_2b03d27c)\
**Post date:** [February 17, 2016, 2:27pm UTC](https://forums.unrealengine.com/t/why-cant-i-select-an-actor-from-my-scene/347545/6 "2016-02-17T14:27:00Z")

</div>

Using the level blueprint would be the least complicated solution. The directional light class in the engine is marked with Minimal API which limits the ability to extend this class / create a pointer to an object of this type. If you are trying to exclusively use code you may find another community member on the forums who has attempted to do so.
