-
Notifications
You must be signed in to change notification settings - Fork 37
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 Fixes for the ModPrefabCache #469
Multiple Fixes for the ModPrefabCache #469
Conversation
1. Set cached prefabs as inactive. 2. Set check before caching prefab as its all async and may have been registered moments before. 3. Null Check ProcessPrefabAsync 4. Add prefab name to error log when missing PrefabIdentifier
This seems fine for now, should be ready to merge, but it would probably be best to make a system that uses existing prefab requests for “work in progress” prefabs rather than running multiple requests at the same time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments
…y the duplicates. Created a Dictionary<string, ModPrefabRequest> called Requests in tht ModPrefabCache. Made GetModPrefabAsync return the cached request instead of making a new one. Made ModPrefabRequest add itself to the ModPrefabCache.Requests when created. Retargeted InstantiateAsync and SpawnAsyncReplacement to use GetModPrefabAsync isntead of bypassing the request system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Changes made in this pull request
Breaking changes