Description

FSoftObjectPathCustomization and SPropertyEditorAsset do not support multiple actor classes in the AllowedClasses list.

The ObjectClass is only set in FSoftObjectPathCustomization if there is only one AllowedClass which is derived from Actor. Otherwise it assumes that the object path references an asset.

The code should instead attempt to check if all AllowedClasses are actors.

Steps to Reproduce
  1. Create a new C++ class, based on actor
  2. Add these lines to the class header (YourClass.h) under "public:"
    • UPROPERTY(EditAnywhere, meta=(AllowedClasses="PointLight,SpotLight"))
    • FSoftObjectPath Light;
  3. Build the solution
    • Ctrl+Shift+B
  4. Drag the actor into the level
  5. Add a point light and a spot light to the level
  6. Select the class in the details view
  7. Select the dropdown, and observe that no actors are displayed in the list

Alternate Repro

  1. Open any project
  2. Type testprops into the console
  3. Scroll down and click the dropdown for "Texture or Blendable Interface"
  4. Note that only textures and materials should populate here

Result
The dropdown is empty

Expected
The dropdown populates with the allowed classes. Point and spot lights for the first repro, materials and textures for the second.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-76971 in the post.

0
Login to Vote

Fixed
ComponentTools
Affects Versions4.23
Target Fix4.24
Fix Commit7306318
Main Commit8614014
Release Commit9552237
CreatedJul 9, 2019
ResolvedJul 15, 2019
UpdatedApr 30, 2020