We are using the built-in Perforce integration in Unity (currently using 5.5.0f3). We’ve encountered an issue that is slowing us down a lot – it looks like if we have prefabs in our scene that have NodeCanvas FSMs in them somewhere, when we save our scene (without having made any changes to these prefabs or their FSMs), the prefabs just get auto checked out. The prefabs themselves aren’t actually changing, as the files are identical, they are just being checked out annoyingly. This causes tons of chaos for us, because pretty much every prefab ends up inadvertently in someone’s changelist, preventing the people who need these prefabs from being able to work on them. Have other people encountered this? Any workarounds you can suggest? Thanks!
Thanks for reporting this issue. I have found the cause of this.
To fix this, please open up GraphOwner.cs, find and completely replace the method called “OnGraphSerialized” with the following code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Called in editor only after assigned graph is serialized.
//If the graph is bound, we store the serialization data here.
As you can tell, the cause was calling SetDirty without first checking if something is actually changed. Making this change should resolve the issue, but please let me know if not.
Thanks for the quick reply! I just put this in our code and it appears to have fixed the issue on quick inspection. I’ll keep an eye out and reply here if the problem persists. Much appreciated!