beamable / BeamableProduct

The beamable product suite including com.beamable, com.beamable.server, microservice base image, portal, the installer, and build scripts
Other
5 stars 0 forks source link

Tool for resolving Content changes, especially unexpected Content differences #3573

Open allister-beamable opened 3 months ago

allister-beamable commented 3 months ago

Describe the impetus of the Feature Request

Sometimes, often with no obvious reason why, Content Manager in a Unity project with Beamable will show that certain pieces of content are changed. This appears as a blue square next to the content item, when I expect it to be a gray square indicating that the content is fully in sync. The extra-mysterious, extra-frustrating case of this is when, immediately after downloading content from the realm, there are still blue squares. In this case it is not clear how to resolve the difference.

Anecdotally, the causes for this have included:

Regardless of cause, it is frustrating to not know why Content Manager is showing these items as different, and often enough the actual bytes within the .asset file are identical (implying that the difference has to do with file modification timestamps or tags). Having good ways to inspect, in detail, the reasons why an item is marked as changed, would go a long way towards allowing Game Makers to resolve the situation.

Describe the solution you would like

Anytime there are differences or errors on any content item, there should be a convenient, obvious way for the Game Maker to inspect the differences or errors. This should take the form of a persistent UI (that is, NOT an ephemeral hover-text or tooltip) where the Game Maker can see exactly why any individual item is considered different or erroneous, as well as navigation tools to view the differences and errors in a holistic, big-picture fashion.

Ideally this diff tool should also provide convenient functionality for resolving simple differences:

Describe alternatives you have considered

There are no alternatives other than "avoid Content Manager altogether"; the difference detection of Content Manager is fundamentally broken, but until we have visibility into it, we cannot say exactly how or why it is broken.

Additional context

Sometimes when there are truly spurious differences reported, forcing a domain reload in Unity helps, but it is very finicky to get that to happen properly. This is likely more of a deficiency in Unity as a whole than anything we can do about in the SDK.

cdhanna commented 3 months ago

The CLI should have a diff tool built in,

beam content diff

Should output some semantic set of changes like,

  1. field value changed
  2. new field
  3. missing field
  4. ???

Then each engine integration can ingest that data to visualize the diff, and offer buttons to make actions to modify the scriptable object stuff.

allister-beamable commented 3 months ago

I just checked, and hitting "Revert Item" on an item that is mysteriously different does not resolve the difference.

Screenshot 2024-08-08 at 09 45 10

(in the screenshot, the item is leaderboards.default, and I am pretty sure it is showing blue because of the prod-to-dev realm switching I mentioned in the beginning of the bug description)

cdhanna commented 3 months ago

on that right click menu, we should have a "show diff" option that opens a new EditorWindow bound to showing the diff between the local content id, and the realm's version