#[BUG] Entities 1.1.0-exp.1 2022.3.12f Building exception

1 messages · Page 1 of 1 (latest)

balmy bone
#

I am getting exception as I try to make a build.
770e7f24a10b4de438bde5992147c841 GUID matches one of our scene assets.
I debugged this exception a bit and found out that this scene gets added two times: first as entity scene, second as just Object.

#

@low bay

#

Now something I noticed is that when I disable this code it builds fine (but game obviously can't function without referencing scenes).

            public override void Bake(SceneDatabaseAuthoring databaseAuthoring)
            {
                var sceneDefinitions = AssetUtility.GetAssets<SceneDefinition>("Assets/Data/Scenes");
                var sortedScenes = sceneDefinitions.OrderBy(x => x.SceneId);

                var entity = GetEntity(TransformUsageFlags.None);
                var buffer = AddBuffer<SceneReferenceBufferData>(entity);
                foreach (var sceneDefinition in sortedScenes)
                {
                    buffer.Add(new SceneReferenceBufferData()
                    {
                        Value = new EntitySceneReference(sceneDefinition.subScene.SceneAsset)
                    });
                }
            }
#

if relevant: AssetUtility.GetAssets is calling AssetDatabase.FindAssets, but exactly same error happens if I author directly via authoring field.

balmy bone
#

Something I found during debugging in ContentArchivesBuildUtility.cs line 68

#

Basically it adds tons of duplicate AssetBundleBuilds

#

f0d5b4df98c9d2c4a9cade8503336081 is a scene asset. Pretty big one.

floral portal
#

Is this scene also being reference by a scene from the build window?

balmy bone
#

I build via script, where I specify just one game object scene, which is not in that list at all

low bay
#

i know nothing about this code myself, but i could probably poke the right people with a bug number

#

it certainly sounds like a bug to me