Search Unity

Question Unity Sourcetree Plugin namespace reference error infinity loop

Discussion in 'VR' started by JorickBronius, Nov 10, 2022.

  1. JorickBronius

    JorickBronius

    Joined:
    Jun 21, 2013
    Posts:
    5
    Hi! I have basic understanding of using Sourcetree and Unity. I'm working with my colleague on a VR project that features 2 players in the same virtual room, for which we're using Photon. We're also using FMOD, Oculus, DOTWEEN, FMETP_STREAM and Sirenix.

    We have a rather detailed gitignore, possibly too detailed?

    Code (CSharp):
    1. # This .gitignore file should be placed at the root of your Unity project directory
    2. #
    3. # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
    4. #
    5. /[Ll]ibrary/
    6. /[Tt]emp/
    7. /[Tt]emp.meta
    8. /[Oo]bj/
    9. /[Bb]uild/
    10. /[Bb]uilds/
    11. /[Ll]ogs/
    12. /[Uu]ser[Ss]ettings/
    13. /[Mm]emoryCaptures/
    14.  
    15. # Asset meta data should only be ignored when the corresponding asset is also ignored
    16. !/[Aa]ssets/**/*.meta
    17.  
    18. # Uncomment this line if you wish to ignore the asset store tools plugin
    19. # /[Aa]ssets/AssetStoreTools*
    20.  
    21. # parrelsync not needed for Jorick:
    22. # /[Aa]ssets/ParrelSync*
    23.  
    24. # Autogenerated Jetbrains Rider plugin
    25. [Aa]ssets/Plugins/Editor/JetBrains*
    26.  
    27. # Amplify not needed for Jorick
    28. [Aa]ssets/AmplifyShaderEditor*
    29.  
    30. # Visual Studio cache directory
    31. .vs/
    32.  
    33. # Gradle cache directory
    34. .gradle/
    35.  
    36. # Autogenerated VS/MD/Consulo solution and project files
    37. ExportedObj/
    38. .consulo/
    39. *.csproj
    40. *.unityproj
    41. *.sln
    42. *.suo
    43. *.tmp
    44. *.user
    45. *.userprefs
    46. *.pidb
    47. *.booproj
    48. *.svd
    49. *.pdb
    50. *.mdb
    51. *.opendb
    52. *.VC.db
    53.  
    54. # Unity3D generated meta files
    55. *.pidb.meta
    56. *.pdb.meta
    57. *.mdb.meta
    58.  
    59. # Unity3D generated file on crash reports
    60. sysinfo.txt
    61.  
    62. # Builds
    63. *.apk
    64. *.unitypackage
    65.  
    66. # Crashlytics generated file
    67. crashlytics-build.properties
    68.  
    69. # Mac stuff
    70. .DS_Store
    71. .bak
    72. .BAK
    73.  
    74. ### FMOD Unity Integration ###
    75. # Never ignore DLLs in the FMOD subfolder, so make sure that the FMOD-folder is in the correct path.
    76. !/[Aa]ssets/Plugins/FMOD/**/*.dll
    77.  
    78. # Don't ignore images and gizmos used by FMOD in the Unity Editor
    79. !/[Aa}ssets/Gizmos/FMOD/*
    80. !/[Aa}ssets/Editor Default Resources/FMOD/*
    81.  
    82. # Ignore the Cache-file since it is updated locally either way
    83. /[Aa]ssets/**/FMODStudioCache.asset
    84. /[Aa]ssets/**/FMODStudioCache.asset.meta
    85. [Aa]ssets/Plugins/FMOD/Cache.meta
    86. /[Aa]ssets/Plugins/FMOD/Cache/Editor.meta
    87.  
    88. # Log-files
    89. fmod.log
    90. fmod_editor.log
    91.  
    92. # FMOD 1.10.x (Legacy)
    93. /Assets/FMODAssets/*
    94. /Assets/FMODStudioCache.meta
    95.  
    96. #Odin inspector
    97. # Ignore the auto-generated AOT compatibility dll.
    98. /Assets/Plugins/Sirenix/Assemblies/AOT/*
    99.  
    100. # Ignore all unpacked demos.
    101. /Assets/Plugins/Sirenix/Demos/*
    102.  
    103. # But keep the demo packages themselves.
    104. !/Assets/Plugins/Sirenix/Demos/*.unitypackage
    105.  
    106.  
    107. Assets/Photon/
    108. Assets/Plugins/
    109. Assets/FMETP_STREAM/
    110. Assets/Oculus/
    111. Assets/Demigiant/
    112. <<<<<<< HEAD
    113. Assets/Photon.meta
    114. =======
    115. Photon.meta
    116. >>>>>>> b4d66b80e8f59dc327ca26196082dfe3e4d4a478
    117. Assets/FMETP_STREAM.meta
    118. Assets/Oculus.meta
    119. Assets/Plugins.meta
    120.  
    We've established that keeping these plugins from the gitignore list caused a multitude of weird conflicts.

    Right now, we seem to be stuck in a loop that when my colleague or I pull in or merge another's commit, Unity spews out hundreds of CS0246 errorcodes: "The type or namespace *INSERT ANY* could not be found.." of files related to those plugins.
    These errors are then fixable by reimporting the plugin files from a backup, yet this action is also what seems to keep the loop alive; Sourcetree will notice this action, regardless of it being on the gitignore. Since we're trying to keep this plugin stuff away from version control, we do Stop Tracking when these "changes" arise in a new commit and Discard when these "changes" are pulled or merged. Since all of it is on the gitignore list, how come it doesn't actually ignore the changes made to these files, regardless of them having the same name and path as listed on the gitignore? Seems of (presumably) little relevance, but I work on mac, while my colleague works on PC.

    It feels like we're using git the wrong way, even after literal months of looking into this problem. We've spent too many days reimporting, looking up the issue online and coming up with solutions and failing, but it seems we're just stuck. Help is really much appreciated!

    Side question: how does that <<<<HEAD>>>> part in the gitignore list change gits behaviour?