Skip to main content
Grammar
Source Link
DMGregory
  • 140.8k
  • 23
  • 257
  • 401

How to prevent Unity3D generatesUnity from generating unnecessary changes after saving a scene with no actual changes

I was having trouble where Git shows a lot of changes (for my case, about ~3000 diff change since I have many objects in the scene) after saving a scene (.unity file) in Unity3DUnity, even though there are no changes made onto the scene file (.unity file).

enter image description hereDiff output enter image description hereMore diffs

Upon checking, I noticed Unity3DUnity recompiled the scene file and some values are just in a different order.

How do we prevent this from happening?

Steps to reproduce:

  1. Open the scene file.
  2. Disable and enable backre-enable any GameObject (just to trigger Unity to think there'rethere are changes, so you can save the scene file).
  3. Save the scene file.

How to prevent Unity3D generates unnecessary changes after saving scene with no actual changes

I was having trouble where Git shows a lot of changes (for my case, about ~3000 diff change since I have many objects in the scene) after saving scene (.unity file) in Unity3D, even though there are no changes made on the scene file (.unity file).

enter image description here enter image description here

Upon checking, I noticed Unity3D recompiled the scene file and some values are just in a different order.

How do we prevent this from happening?

Steps to reproduce:

  1. Open the scene file.
  2. Disable and enable back any GameObject (just to trigger Unity to think there're changes, so you can save the scene file).
  3. Save the scene file.

How to prevent Unity from generating unnecessary changes after saving a scene with no actual changes

I was having trouble where Git shows a lot of changes (for my case, about ~3000 diff change since I have many objects in the scene) after saving a scene (.unity file) in Unity, even though there are no changes made to the scene.

Diff output More diffs

Upon checking, I noticed Unity recompiled the scene file and some values are just in a different order.

How do we prevent this from happening?

Steps to reproduce:

  1. Open the scene file.
  2. Disable and re-enable any GameObject (just to trigger Unity to think there are changes, so you can save the scene file).
  3. Save the scene file.
Bumped by Community user
Tweeted twitter.com/StackGameDev/status/1536679871795154945
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Source Link
kkl
  • 43
  • 4

How to prevent Unity3D generates unnecessary changes after saving scene with no actual changes

I was having trouble where Git shows a lot of changes (for my case, about ~3000 diff change since I have many objects in the scene) after saving scene (.unity file) in Unity3D, even though there are no changes made on the scene file (.unity file).

enter image description here enter image description here

Upon checking, I noticed Unity3D recompiled the scene file and some values are just in a different order.

How do we prevent this from happening?

Steps to reproduce:

  1. Open the scene file.
  2. Disable and enable back any GameObject (just to trigger Unity to think there're changes, so you can save the scene file).
  3. Save the scene file.