Skip to content
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

Multiple Projects require Module class if they reference eachother. #2200

Open
Doprez opened this issue Mar 25, 2024 · 6 comments · May be fixed by #2288
Open

Multiple Projects require Module class if they reference eachother. #2200

Doprez opened this issue Mar 25, 2024 · 6 comments · May be fixed by #2288
Labels
bug Something isn't working

Comments

@Doprez
Copy link
Contributor

Doprez commented Mar 25, 2024

Release Type: official

Version: 4.2.0.2122

Platform(s): Windows

Describe the bug
When you hae a multiproject structure and the projects reference eachother, they wont show components in the GameStudio.

To Reproduce
Steps to reproduce the behavior:

  1. create base project
  2. add another project through VS
  3. add a StatupScript to the external project
  4. Now you should see the Script in GameStudio after a restart
  5. create a reference between the external project and the main
  6. after retarting GameStudio you will not see the components in that external project anymore

Expected behavior
The components should still show in the drop down since it will be very likely the references will exist.

Additional context
There is a work around, in each of the external projects you can add a Module class and the components should show up normally.

Repro: https://github.com/Doprez/MultiProjectIssue/tree/main

@Doprez Doprez added the bug Something isn't working label Mar 25, 2024
@Doprez
Copy link
Contributor Author

Doprez commented Mar 25, 2024

26c3696

Should be related to the commit above once this gets looked into.

@IXLLEGACYIXL
Copy link
Collaborator

26c3696

Should be related to the commit above once this gets looked into.

or atleast in that area

@Kryptos-FR
Copy link
Member

Kryptos-FR commented Mar 26, 2024

Module shouldn't be required. But you should need to reference the asset compiler package, which I think was always the case. Not sure if a package file is necessary. I think it does if there are assets other than code.

Also it's unclear which project references which one in your case, as two projects cannot each reference each other. That's not allowed in .NET.

@IXLLEGACYIXL
Copy link
Collaborator

IXLLEGACYIXL commented Mar 26, 2024

the sdpkg file is ( should ) only be needed when you have assets in your sub project

the module is the current workaround around that bug

@Doprez
Copy link
Contributor Author

Doprez commented Mar 26, 2024

Also it's unclear which project references which one in your case, as two projects cannot each reference each other. That's not allowed in .NET.

My mistake, the amount of projects dont matter in this case I was just testing 2 scenarios.

  1. if the project exists in the solution but doesnt reference the main project then components show up in editor
  2. if the project exists in the solution but does reference the main project then components do not show up in editor

I think I may have messed up my repro if the project does not show those 2 scenarios and I will fix it when I can.

I will also see if the same issue applies if the Asset Compiler is referenced, I did not try with that.

for more context, there was a discussion Joreyk, Vaso and I had in Discrod here

Doprez added a commit to Doprez/TR.Stride that referenced this issue Mar 27, 2024
johang88 pushed a commit to johang88/TR.Stride that referenced this issue Mar 27, 2024
@IXLLEGACYIXL
Copy link
Collaborator

IXLLEGACYIXL commented May 27, 2024

the problem is in the projectwatcher afaik

1. change the Class2
2. projectwatcher sends a broadcast with the change list of OddBehaviour ( only that project, because csproj changed??? )
3. triggers reload screen
4. projectwatcher sends broadcasts with the changes oddbehaviour.test2.dll
5. dll changes arent included in the reload as binary changes will get ignroed for the relaod screen :(

in addition to that.. why are these binary changes? its a project change... it shouldnt even happen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants