WITH_EDITORONLY_DATA affects the chunk distribution of resources

class AssetA
{
#if WITH_EDITORONLY_DATA
protected: 
    // Spritesheet group that this sprite belongs to
    UPROPERTY(Category=Sprite, EditAnywhere, AssetRegistrySearchable)
    class UPaperSpriteAtlas* AtlasGroupA;
#endif
}
 
class AssetB
{
    // Spritesheet group that this sprite belongs to
    UPROPERTY(Category=Sprite, EditAnywhere, AssetRegistrySearchable)
    class UPaperSpriteAtlas* AtlasGroupB;
}
  1. In the Cook process, there are resources AssetA and AssetB.
  2. AssetA and AssetB both reference AssetC. [AtlasGroupA = AssetC, AtlasGroupB = AssetC]。
  3. AssetA and AssetB belong to different chunks, AssetA’s chunk has a higher priority。
  4. In the actual process, AssetC will enter the chunk of AssetA, but it is actually expected to enter the chunk of AssetB.
  5. We don’t want WITH_EDITORONLY_DATA references to affect the distribution of chunk resources

Steps to Reproduce



Hi,

I’ve tried to reproduce this locally, but the reference is correctly identified as EditorOnly for me and the “AssetC” asset is consistently ending up only in chunk2 (the one that has the regular reference in my case).

Could you check the reference viewer from within the Asset Audit window to check if there are any other references that could possibly pull in that Asset?

The steps would be the following:

  1. Open Window -> Developer Tools -> Asset Audit
  2. Select “WindowsNoEditor” in the drop-down on the top-right to inspect the cooked data. This requires the project to be cooked/packaged once
  3. Click “Add Asset Class” -> Select “PaperSpriteAtlas”
  4. Right click the asset that end up in the wrong chunk (“AssetC”) and choose “Reference Viewer”

The result should look like this:[Image Removed]

The arrow from AssetA is an EditorOnly reference and rendered darker than the one from AssetB.

If I disable the “Show EditorOnly References” option the top reference dissappears.

If you have any other reference that is pulling in that asset you should be able to see what else if referencing that asset when the EditorOnly references are disabled.

You could also try checking your Saved\Cooked\WindowsNoEditor\Chuking_Editoronly\Metadata\ChunkManifest\AllChunksInfo.csv file and check whether AssetC is listed as Hard or Soft ref. If it’s a soft ref the file should list a guess where the ref is coming from.

Kind Regards,

Sebastian