EyeDropper from scene isnt working

I made a UPROPERTY and added the Specifiers and Metadata to make it Class picker. It compiles fine no error and the search has the 2 spot lights in the world inside the editor and they are added when i click on it but when i try to use the Eyedropper Class picker it doesnt work. Am i missing something?

UPROPERTY(EditAnywhere, Category = "SpotLight", meta = (AllowedClasses = ASpotLight, ExactClass = true))
ASpotLight* SpotlightPicker;

Hello!

Did you tried without this? ExactClass = true and i think you should add BlueprintReadWrite too after EditAnywhere

Just tried it still doesnt work. :frowning: Does it work for anyone else?

Dont be shy. Show us whats going on.

You have a Class you have created, (Where is the header? where is the CPP? DId you wrap this in a blueprint?)? And you have placed it in the world, (where is the SceneOutliner?)?

Or even better, if you could take a simplified version of the class, the bp, the level, and zip it all up, and upload it. Then I can load it into unreal and see whats going on.

there isnt really much at all im just redoing a blueprint actor i did inside visual studio for learning purposes. The UPROPERTY is inside the header file in scope of the Generated_Body like it should be.

Hey.

Your issue is caused by… one letter. :stuck_out_tongue:

AllowedClasses meta data accepts name of classes without their prefixes. So for ASpotLight you just skip the ‘A’ etc.

As a side note: in your case you don’t even need to use that (same goes for ExactClass). You should be fine with something like this:

UPROPERTY(EditAnywhere, Category = "SpotLight")
class ASpotLight* SpotlightPicker; // forward declaration to avoid including SpotLight.h in header file

Cheers!