Skip to content

In a Particular instance, there is no code generation for custom variables of Gum components #1740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mza299 opened this issue May 2, 2025 · 2 comments

Comments

@mza299
Copy link

mza299 commented May 2, 2025

The issue in question relates to : #1705

In a test FRB screen, i made an empty component with some variables. With breakpointing in VS, these variables are appropriately assigned. So are some other Gum components in my project. But some are not assigned.

In my project's "testing" screen (called Debug2), i've added the problematic component to isolate it and the error happens again.

In my VS proj, if you find CatUpgradeIconRuntime.cs under Gumruntimes/Controls and add a breakpoint after CustomInitialise. And if you look for the variable IsForFarming, IsForFishing, and RequiredLevel, you should find they are defaulted to false, false, 0 respectively. This is all in my latest commit.

Although, i was unable to recreate the bug, you may find a solution and potential bugs from this issue.

@mza299
Copy link
Author

mza299 commented May 10, 2025

I've changed my repo, which would make solving this difficult. Let me know if you work on this so that i can make a commit, which should make it easier.

@mza299
Copy link
Author

mza299 commented May 11, 2025

I managed to somewhat replicate the bug:

The whole process from start to finish.

1.) Create a gum component
2.) Add a variable to the component by pressing the "add varaible" button at the bottom of the varaibles tab window. In my case, I added a string "TestString" and gave it the value "Hello World".
3.) Drag and drop the variable onto a empty gumscreen to create an instance of it.
4.) In VS add a breakpoint at the end of custominitialise for gumcomponent.cs.

This works. in VS TestString = "Hello World" ✅

5.) In gum under the gumscreen used for testing, select the gum component you just made
6.) Copy and paste it to make another instance - CTRL +C/V.
7.) Change TestString (or whatever variable you made earlier) to something different. Now you have two instances with different TestString values.
8.) Check both instances in VS. Add a breakpoint to the end of initialise on the testscreen.cs This works ✅

9.) Following on from 8.), create another gum component
10.) add two instances of the component you made earlier to this "container" component. I named it "TestContainer".
11.) Within the TestContainer change the "TestString" values to something different.
12.) In your test gumscreen add the TestContainer
13.) Repeat 4.)/8.) but breakpont end of initalise on Testcontainer.cs. This works ✅

14.) Select the original gum component you made in 1.)
15.) Create a category and two states within the category. I made Caetory named "Type" and states "1" and "2".
16.) Modify states 1 and 2 such that TestString has different values.
17.) For the Tescontainer gum component change the Type state for both child instances, one being 1, the other 2.
18.) repeat 13.) This does not work ❌ kindoff

for the first instance (where TypeState = 1) of TestContainer, TestString = "Hello", which is the default value when generating a string variable in gum.

But the second instance showed the right string value. I double checked everything in Gum and repeated this and it gave the same result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant