Inspector's delta file seems to excess

  1. I press “Start recording”;
  2. Select the cube in my scene;
  3. Change X position;
  4. Press “Generate Delta File”;

And the file is too large for these actions.
It contains “materials”, I even didn’t touch them!
It contains all cube positions, but I changed only one axis.

So, the “materials” in the file look like an obvious bug. Is’t it?
And positions, why we fix all position axis, but changed only one? Can we change this behavior?

materials should not be in if nothing changes in the material (from the inspector or through the scene code) but about positions, we are keeping by design the entire objects as the feature is not recording the actions but creating a delta between a serialized JSON when we start recording and after.

I applied your instructions on the default playground and moved the position.x of the sphere and got only:

{"meshes":[{"position":[1,1,0],"__state":{"id":"sphere"}}]}

I tried by modifying the position either by typing a new value for position.x or by using the gizmo and the result was the same.

I don’t know why you get so many changes in the delta file…

1 Like

a repro would be useful to understand what is happening in your scene

1 Like

New material is appears when I click to “Start recording”.

Before click:
image

And after:
image

Seems like this is the Mesh logic:

serialize(serializationObject = {}) {
// ...
if (this.material) {
    if (!this.material.doNotSerialize) {
        serializationObject.materialUniqueId = this.material.uniqueId;
        serializationObject.materialId = this.material.id; // back compat
    }
}
else {
    this.material = null;
    serializationObject.materialUniqueId = this._scene.defaultMaterial.uniqueId;
    serializationObject.materialId = this._scene.defaultMaterial.id; // back compat
}

because some of meshes does not have own material.

So, it is not a bug. Sorry, please xD

1 Like