Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question "IncomingChangesTab" script has errors

Discussion in 'Scripting' started by SPICYham, Sep 22, 2023.

  1. SPICYham

    SPICYham

    Joined:
    Jun 29, 2022
    Posts:
    3
    Hello Unity Forums,

    I am very inexperienced with programming and only know the little tiny baby basics of Unity. Apologies in advance if this is quite an easy bug to fix. This is my first time posting on forums too, so apologies if I needed to include something important.

    I go to open my unity project when Unity asks me if I want to turn on safe mode. Turning on safe mode reveals 3 errors I had never seen before.
    upload_2023-9-21_20-16-47.png
    Library\PackageCache\com.unity.collab-proxy@1.15.7\Editor\PlasticSCM\Views\IncomingChanges\Gluon\IncomingChangesTab.cs(74,46): error CS0426: The type name 'ResolveUserName' does not exist in the type 'IncomingChangesViewLogic'

    Library\PackageCache\com.unity.collab-proxy@1.15.7\Editor\PlasticSCM\Views\IncomingChanges\Gluon\IncomingChangesTab.cs(73,21): error CS0121: The call is ambiguous between the following methods or properties: 'IncomingChangesViewLogic.OutOfDateItemsOperations.OutOfDateItemsOperations()' and 'IncomingChangesViewLogic.OutOfDateItemsOperations.OutOfDateItemsOperations()'

    Library\PackageCache\com.unity.collab-proxy@1.15.7\Editor\PlasticSCM\Views\IncomingChanges\Gluon\IncomingChangesTab.cs(72,21): error CS1729: 'IncomingChangesViewLogic.ApplyWorkspaceLocalChanges' does not contain a constructor that takes 0 arguments


    Clicking on these sends me to the "IncomingChangesTab" script.
    I have removed some irrelevant code below the important stuff. Let me know if you need to see it.

    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3.  
    4. using UnityEditor;
    5. using UnityEngine;
    6.  
    7. using Codice.Client.BaseCommands;
    8. using Codice.Client.BaseCommands.EventTracking;
    9. using Codice.Client.Commands;
    10. using Codice.Client.Common.FsNodeReaders;
    11. using Codice.CM.Common;
    12. using GluonGui;
    13. using PlasticGui;
    14. using PlasticGui.Gluon.WorkspaceWindow;
    15. using PlasticGui.Gluon.WorkspaceWindow.Views.IncomingChanges;
    16. using PlasticGui.WorkspaceWindow.Diff;
    17. using PlasticGui.WorkspaceWindow.Merge;
    18. using Unity.PlasticSCM.Editor.AssetUtils;
    19. using Unity.PlasticSCM.Editor.Tool;
    20. using Unity.PlasticSCM.Editor.UI;
    21. using Unity.PlasticSCM.Editor.UI.Progress;
    22. using Unity.PlasticSCM.Editor.UI.Tree;
    23. using Unity.PlasticSCM.Editor.Views.IncomingChanges.Gluon.Errors;
    24.  
    25. namespace Unity.PlasticSCM.Editor.Views.IncomingChanges.Gluon
    26. {
    27.     internal class IncomingChangesTab :
    28.         IIncomingChangesTab,
    29.         IRefreshableView,
    30.         IncomingChangesViewLogic.IIncomingChangesView,
    31.         IIncomingChangesViewMenuOperations,
    32.         IncomingChangesViewMenu.IMetaMenuOperations
    33.     {
    34.         internal IncomingChangesTab(
    35.             WorkspaceInfo wkInfo,
    36.             ViewHost viewHost,
    37.             WorkspaceWindow workspaceWindow,
    38.             NewIncomingChangesUpdater newIncomingChangesUpdater,
    39.             CheckIncomingChanges.IUpdateIncomingChanges updateIncomingChanges,
    40.             StatusBar statusBar,
    41.             EditorWindow parentWindow)
    42.         {
    43.             mWkInfo = wkInfo;
    44.             mNewIncomingChangesUpdater = newIncomingChangesUpdater;
    45.             mParentWindow = parentWindow;
    46.             mStatusBar = statusBar;
    47.  
    48.             BuildComponents();
    49.  
    50.             mProgressControls = new ProgressControlsForViews();
    51.  
    52.             mCooldownClearUpdateSuccessAction = new CooldownWindowDelayer(
    53.                 DelayedClearUpdateSuccess,
    54.                 UnityConstants.NOTIFICATION_CLEAR_INTERVAL);
    55.  
    56.             mErrorsSplitterState = PlasticSplitterGUILayout.InitSplitterState(
    57.                 new float[] { 0.75f, 0.25f },
    58.                 new int[] { 100, 100 },
    59.                 new int[] { 100000, 100000 }
    60.             );
    61.  
    62.             mErrorDetailsSplitterState = PlasticSplitterGUILayout.InitSplitterState(
    63.                 new float[] { 0.60f, 0.40f },
    64.                 new int[] { 100, 100 },
    65.                 new int[] { 100000, 100000 }
    66.             );
    67.  
    68.             mIncomingChangesViewLogic = new IncomingChangesViewLogic(
    69.                 wkInfo, viewHost, this, new UnityPlasticGuiMessage(parentWindow),
    70.                 mProgressControls, updateIncomingChanges,
    71.                 workspaceWindow.GluonProgressOperationHandler, workspaceWindow,
    72. //right below is where the errors send me to
    73.                 new IncomingChangesViewLogic.ApplyWorkspaceLocalChanges(),
    74.                 new IncomingChangesViewLogic.OutOfDateItemsOperations(),
    75.                 new IncomingChangesViewLogic.ResolveUserName(),
    76.                 new IncomingChangesViewLogic.GetWorkingBranch(),
    77.                 NewChangesInWk.Build(wkInfo, new BuildWorkspacekIsRelevantNewChange()),
    78.                 null);
    79.  
    80.             mIncomingChangesViewLogic.Refresh();
    81.         }
    82.  
    83.        
    84.     }
    85. }
    what does this even mean
    I have unity collaborate turned off, if that matters.
    I haven't imported anything or changed any settings.
    Turning off safe mode just crashes unity.
    help
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,560
    I think you gotta go further and remove the package. Yes, it's annoying. Sorry. :/

    Extra unwanted packages in new projects (collab, testing, rider and other junk):

    https://forum.unity.com/threads/temp-unityengine-testrunner-dll-error.1133938/#post-7287748

    About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

    Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122
     
  3. SPICYham

    SPICYham

    Joined:
    Jun 29, 2022
    Posts:
    3
    First of all, thank you so much for your quick reply! I have a few issues here.
    upload_2023-9-21_21-18-54.png
    I can't seem to find any junk/the collaboration package in the package manager window, all of this seems to be useful.
    I also can't seem to find the manifest.json file in the package folder either, unless it is in one of the folders?
    upload_2023-9-21_21-21-53.png

    I have found this file in C:\Program Files\Unity\Hub\Editor\2020.3.28f1\Editor\Data\Resources\PackageManager\Editor, but I just wanted to confirm this is the right manifest file before deleting anything, as it looks completely different from the one you provided.
    upload_2023-9-21_21-25-26.png
    Again, apologies for incompetence; I am a unity baby and could be completely overlooking it.
    Thank you so much for your help!
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,560
    NO NO! Don't change that. Never change anything in program files!!

    Your
    Packages/manifest.json
    is in that directory, with Packages right next to Assets and ProjectSettings, viewable from Explorer on your project window.

    Right click on Project window, bring up in explorer, back up until you're at that Assets folder level, then one more up.

    Make a backup first or use source control ideally before you chop at it.



    PROPERLY CONFIGURING AND USING ENTERPRISE SOURCE CONTROL

    I'm sorry you've had this issue. Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

    Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

    You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

    As far as configuring Unity to play nice with git, keep this in mind:

    https://forum.unity.com/threads/prefab-links-keep-getting-dumped-on-git-pull.646600/#post-7142306

    I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

    Here is how I use git in one of my games, Jetpack Kurt:

    https://forum.unity.com/threads/2-steps-backwards.965048/#post-6282497

    Using fine-grained source control as you work to refine your engineering:

    https://forum.unity.com/threads/whe...grammer-example-in-text.1048739/#post-6783740

    Share/Sharing source code between projects:

    https://forum.unity.com/threads/your-techniques-to-share-code-between-projects.575959/#post-3835837

    Setting up an appropriate .gitignore file for Unity3D:

    https://forum.unity.com/threads/removing-il2cpp_cache-from-project.1084607/#post-6997067

    Generally the ONLY folders you should ever source control are:

    Assets/
    ProjectSettings/
    Packages/

    NEVER source control Library/ or Temp/ or Logs/
    NEVER source control anything from Visual Studio (.vs, .csproj, none of that noise)

    Setting git up with Unity (includes above .gitignore concepts):

    https://thoughtbot.com/blog/how-to-git-with-unity

    It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

    If you plan on joining the software industry, you will be required and expected to know how to use source control.

    "Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards
     
  5. SPICYham

    SPICYham

    Joined:
    Jun 29, 2022
    Posts:
    3
    It works! Thank you so much for your help and your patience.
    I ended up just finding the manifest.json file in File Explorer; I wasn't able to find it within Unity itself.
    I will definitely be looking at source control if I have the time.