vchelaru / FlatRedBall

Cross-platform 2D game engine focused on ultimate productivity built in .NET
http://flatredball.com
MIT License
376 stars 60 forks source link

Gum Should Not Lose Component Instance Types #1488

Open profexorgeek opened 6 days ago

profexorgeek commented 6 days ago

I'm filing this by @vchelaru request so we can track it even though we have no repro steps.

Sometimes Gum loses the type for a component instance. For me, I notice when I start getting build errors. In this case, the .Generated code contains references to the UI but the gum components are broken. When you open Gum the specific components have red exclamations and no base type.

The workaround is just to re-set the base type and that typically fixes everything and keeps any unique settings the component already had. But we don't know what series of events is causing them to get lost in the first place. This happened seemingly at random after starting to work on a project that had previously been working fine.

In this image, Rarity, PrimaryStat, SecondaryStat, TertiaryStat, and Value were all instances of a new component called LabelValuePair. They worked fine but when coming back to Gum, all were broken. I had fixed the first two before taking this screenshot:

image

vchelaru commented 6 days ago

This could be related to \ vs / for names, which were causing Glue to also have incorrect namespaces. Track down why slashes were incorrect, maybe it's causing this.

To test this, undo the changes from this commit:

29cb6f0280a20b53ed967db2efc93ab8f64c9344

Then:

  1. Open FRB and Gum
  2. Add a new component to a folder in Gum while the project is open in FRB
  3. Look at code generation

Observe - namespace generation is incorrect due to wrong slash.