Search Unity

Tracking Changes on GameObjects

Discussion in 'Editor & General Support' started by Huxii, Jul 25, 2020.

  1. Huxii

    Huxii

    Joined:
    Sep 15, 2018
    Posts:
    37
    Hello,

    I am developing my game and am struggling, because I have the feeling that I make something, that it disappears. Then I correct it and in some time it's wrong again . And I just don't know why - I cannot retrace the cause. These are different cases. Maybe there are bugs, maybe I am doing something wrong or maybe I just don't understand consequences of some actions. I don't know. But I have just enough of it.

    I would like to make a script, which tracks all changes of all GameObjects in scene (or even better in my whole project) and then write them out into a file, so that when I see a problem I could find out, when exactly this was changed, and look what other changes I made at this time.

    Now my question is: Is there a possibility to track any kind of changes of GameObjects? I would like to have something like "On Awake" but instead "On change". Because I could write like everything out, but the performance would be just hilarious.

    Any ideas?

    Thank you
    Huxi
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    Have you ever worked with version control software before? Version control keeps track of every change you make in your project. You can see each file that changes line by line. In this way you can easily see what has changed in your project and commit those changes or roll them back.

    My recommendation is Git.
     
  3. Huxii

    Huxii

    Joined:
    Sep 15, 2018
    Posts:
    37
    I thought about it, but this save changes just on file level, not on GameObject level.
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,909
    All GameObjects in your project are saved in files. Scene files and prefab files.
     
  5. Huxii

    Huxii

    Joined:
    Sep 15, 2018
    Posts:
    37
    But saved is just the last change before saving the project. Let's say that during one session I made 10 changes. When I save it, it will save just the last change, but not the 9 changes before. And that is what I need. I don't want to have just the last change, when I save the project, but everything, what I made in a session - even I didn't save the project.