Digital-Logic-Sim icon indicating copy to clipboard operation
Digital-Logic-Sim copied to clipboard

Loading/Saving Circuits (Enhancement)

Open Zeyu-Li opened this issue 4 years ago • 4 comments

Not sure if anyone has a fork with this yet but it would be great if you could load circuits from a json file and also save the circuits from a json file

Zeyu-Li avatar Apr 02 '21 14:04 Zeyu-Li

Looks like it's already stored in a JSON format @ %userprofile%\AppData\LocalLow\Sebastian Lague\Digital Logic Sim\SaveData so it shouldn't be too hard to load JSON->read->store to LocalLow

Zeyu-Li avatar Apr 02 '21 14:04 Zeyu-Li

I'm not the best with C# or Unity, but when I attempted that I ran into a couple of issues:

  • The slider handles that spawn when you create inputs didn't get created, so you couldn't move around/rename the inputs
  • The inputs didn't work at all (on/off) nor did any of the wires or other logic gates connected to them I believe there's more to it than just creating the chip items based off the JSON, there must be more functions I'm missing in the code.

okyloky9 avatar Apr 02 '21 17:04 okyloky9

https://github.com/Tigralt/Digital-Logic-Sim this person has created a working view. You can download the source code here and run it in unity, there's no build for it yet. To edit right click on a chip in the hotbar, and click view.

There's also #66 which adds all the other modifications people have made, including the one I just posted

okyloky9 avatar Apr 08 '21 02:04 okyloky9

Builds for #66 version are available here:

As @okyloky9 said it includes working import/export.

AOx0 avatar Apr 08 '21 05:04 AOx0