Exemple #1
0
 public void SetUse(CardPanel.PanelUse miscMeta, string undoLabel)
 {
     using (undoLabel != null ?
            actorEditor.StartUndo(undoLabel) :
            new Util.DummyDisposable())
     {
         BrainMetadata md = Util.FromJsonSafe <BrainMetadata>(actorEditor.GetMetadataJson());
         md.miscPanelUseMetadata = miscMeta;
         actorEditor.SetMetadataJson(JsonUtility.ToJson(md));
     }
 }
 public void SetUse(CardPanel.PanelUse data, string undoLabel)
 {
     AssertInvariants();
     using (undoLabel != null ?
            this.manager.GetActorEditor().StartUndo(undoLabel) :
            new Util.DummyDisposable())
     {
         // Util.Log($"setting use data for {GetTitle()}: {data.position}");
         string newJson = JsonUtility.ToJson(data);
         behavior.SetUseMetaJson(newJson);
     }
     AssertInvariants();
 }