-
-
Notifications
You must be signed in to change notification settings - Fork 979
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
Custom Assets wont create if not registered in the AssemblyRegistry
#2646
Comments
hmm maybe we should convert the entire module initializer to automatically register itself in the source gen? |
That would be awesome! I guess it could create the module with either:
You also need to make sure the project has the Semi separate but maybe another part of the discussion is automatically searching for .sdtpl files and adding them to the sdpkg of the project. It would simplify https://doc.stride3d.net/latest/en/manual/scripts/custom-assets.html#adding-a-section-for-the-add-asset-menu-inside-the-editor but maybe that should just be available in the GameStudio instead. |
detecting the referenced projects isnt hard, but as what should i register them, where are the side effects i would need some ruling... if X then register as Y etc and based on the rules i change the source gen |
It might not be that easy. You could reference Assets packages without defining new assets in your project (for example for some tooling) and registering that assembly (and its dependencies) would be wasteful and could potentially introduces compatibility issues (your tooling could without issue reference an older version of Stride.Assets, as long as that version doesn't get registered it's fine). I prefer to not have too many "magic" behavior that might breaks unexpectedly. Remembering to had an initializer when needed is not a big deal as long as it is documented. |
ok, so if there is a rule that is always true its just a one liner in the source gen , then leave it as is for now i guess |
I tried going to a previous patch, I still had the same issue. I went to the first patch of the 4.2 version and I didn't have an issue there. There seems to be something added in the more recent versions causing this conflict. |
Release Type: Official Release
Version: 4.2.0.2293
Platform(s): Windows
Describe the bug
When following the Custom Assets manual the Add asset option is there but upon clicking it the asset never gets created.
To Reproduce
Steps to reproduce the behavior:
Add Asset
windowExpected behavior
The asset should be created.
Additional context
This is more for people to find a common issue if they are following a similar project structure of have multiple projects.
I will update the docs when I can and complete stride3d/stride-docs#390 to show that its done.
Current Fix
Just create a class called Module.cs in the external project with the asset files and add the below code with your namespace:
The text was updated successfully, but these errors were encountered: