[REQUEST] Add Git support.

Forums 💬 NodeCanvas 🗨️ General Discussion [REQUEST] Add Git support.

  • This topic has 0 replies, 2 voices, and was last updated 10 months ago by Gavalakis.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12959
    lineri
    Participant

      Hello. My team uses Node Canvas to create logic for the behavior of objects. At one point, we noticed that the files were being saved .asset cannot be handled by git as it is required. By default, the entire save file is serialized with ‘pretty = false’, as a result of which all information is written in several lines, where 95% of the information is in the first one, git tracks line changes, so ANY change to the Node Canvas will erase the save file completely and the changes cannot be combined using it. In turn, git does not track and does not issue any errors. In the branch where node ‘A’ was added, pull the branch where node ‘B’ was added, we will not get a graph where nodes ‘A’ and ‘B’ will be, there will only be that node, the commit that was made last. If you set ‘pretty = true’ in the plugin source code the situation is improving somewhat, but still any slightest change entails changes in many lines of the save files.
      I would like to see the serializer change so that files are saved by default in a format that will be supported by git.

      #12960
      Gavalakis
      Keymaster

        Hello and sorry for the late reply.

        In the latest version of NodeCanvas there is an new feature added to optionally serialize the graph asset to an external text file, which was added exactly for these situations and for better source control (git) support. (This is still undocumented but will do so soon).

        To enable this, select the graph asset you want, then in its inspector click the “Create External Serialization Text Asset” button. This will prompt you to create a text asset and the graph will from now on serialize to and deserialize from that text asset (in addition to within itself) as long as the text asset is still assigned. The json in that text asset is in pretty format and therefore better suited for source control.

        Let me know if that works for you.

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.