-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
If I modify the SerializedDictionary during runtime with code, the inspector window does not update to show the changes.
I verified that the change was made using the debugger.
Here's a minimal example of how I had it set up:
using AYellowpaper.SerializedCollections;
public enum BuildingResource {
Gold,
Wood,
Stone,
Gem,
}
public class Example {
public SerializedDictionary<BuildingResource, int> resources;
public void AddResource(BuildingResource resource, int amount) {
if (!this.resources.ContainsKey(resource)) {
this.resources[resource] = 0;
}
this.resources[resource] += amount;
}
public void TestGainGold() {
this.AddResource(BuildingResource.Gold, 10);
Debug.Log($"Gold Added; {this.resources[BuildingResource.Gold]}");
}
public void TestGainWood() {
this.AddResource(BuildingResource.Wood, 10);
Debug.Log($"Wood Added; {this.resources[BuildingResource.Wood]}");
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels