Use reactive shared state in inventory panel
This commit is contained in:
parent
e5799e4950
commit
570365f296
2 changed files with 45 additions and 10 deletions
|
|
@ -7167,6 +7167,36 @@ static void RequireUnitySharedDocumentAccessorErgonomics(string root)
|
|||
string.Join(", ", missingInventoryMenuSharedDocumentSymbols));
|
||||
}
|
||||
|
||||
var inventoryPanel = File.ReadAllText(Path.Combine(
|
||||
root,
|
||||
"Assets",
|
||||
"Scripts",
|
||||
"UI",
|
||||
"Menu",
|
||||
"InventoryPanel.cs"));
|
||||
var requiredInventoryPanelSharedDocumentSymbols = new[]
|
||||
{
|
||||
"CultMeshReactiveDocument<AetheriaRuntimeCatalogSnapshot> _catalog",
|
||||
"CultMeshReactiveDocument<AetheriaRuntimePlayerSettingsDocument> _playerSettings",
|
||||
"ResolveClient().Aetheria().ReactiveCatalog()",
|
||||
".Settings",
|
||||
".ReactivePlayer()",
|
||||
"_catalog?.Dispose()",
|
||||
"_playerSettings?.Dispose()",
|
||||
"_catalog?.Current",
|
||||
"_playerSettings?.Current",
|
||||
"private void OnDestroy()"
|
||||
};
|
||||
var missingInventoryPanelSharedDocumentSymbols = requiredInventoryPanelSharedDocumentSymbols
|
||||
.Where(symbol => !inventoryPanel.Contains(symbol, StringComparison.Ordinal))
|
||||
.ToArray();
|
||||
if (missingInventoryPanelSharedDocumentSymbols.Length > 0)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
"InventoryPanel should bind shared catalog/settings through managed reactive Aetheria documents with panel lifetime disposal: " +
|
||||
string.Join(", ", missingInventoryPanelSharedDocumentSymbols));
|
||||
}
|
||||
|
||||
var volumeCloudRenderer = File.ReadAllText(Path.Combine(
|
||||
root,
|
||||
"Assets",
|
||||
|
|
|
|||
Loading…
Reference in a new issue