Custom Asset library needs to be referenced directly or `AssetCompiler` cant find assets.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release
Version: 4.2.0.2381
Platform(s): Windows
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
- Create 3 projects:
DataModels(Data descriptions),Assets(Defined GameStudio assets and their compilers),Game(The main game project) - Only reference the
DataModelsproject. - Add assets in game studio
- On build there were be an error saying that the asset was not found.
Expected behavior
I think this is supposed to work based on how other libraries are set up with Stride. It should compile the assets into the ContentManager with their runtime serialized data.
Screenshots
Log and callstacks
8>EXEC(1,1): warning 3.406s: [AssetCompiler] Asset [575696e0-017b-4567-bf42-f67eb2052dc9:Data/StatEffects/DamageHealth] not found. Required for package [WorldOfMight.Guilds.Windows]
8>EXEC(1,1): warning 3.406s: [AssetCompiler] Asset [c8ea9e19-38ed-4dda-acd8-45cb9b385bfc:Data/Characters/TestCharacter] not found. Required for package [WorldOfMight.Guilds.Windows]
8>EXEC(1,1): warning 3.406s: [AssetCompiler] Asset [f88d7738-2133-4c55-b4b7-06945bd8d797:Data/Stats/Health] not found. Required for package [WorldOfMight.Guilds.Windows]
Additional context
I only recently changed my project architecture to follow a more modular approach so this is still developing for me. I may simply be missing something for this to work as it does with other Asset types.
A simple work around is to just reference the Asset project within your main project. This is not ideal since its not uncommon for compilers to use reflection and this would effect the eventual work for NAOT and possibly have odd effects on single file outputs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three-project setup described in the issue and inspect the AssetCompiler warnings for the custom assets. Trace how project references expose assets to the compiler and how compiled data reaches ContentManager. Done means the Game project can compile the custom assets without directly referencing the Assets project and without the missing-asset warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100