Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

deleted/change C# code reverts in Visual Studio

Discussion in 'Scripting' started by peterbrinson, Aug 2, 2020.

  1. peterbrinson

    peterbrinson

    Joined:
    Jul 1, 2013
    Posts:
    57
    I'm sure this is an understood situation that I'm new to.

    I updated to 2020.1 and want to get rid of some code in a script I otherwise shouldn't be meddling with - TMPro_Private.cs

    I delete the Debug statement that says this, "Removing unnecessary CanvasRenderer component from text object."

    But when I play in unity, the deleted code literally returns in Visual Studio.

    One clue? -- In visual studio, I 'moved' it into "Assembly-CSharp" and now dozens of functions and variables have the red jagged line under them, even though it I get no errors in the console, and the game runs fine.
     
  2. Dextozz

    Dextozz

    Joined:
    Apr 8, 2018
    Posts:
    355
    It's an internal thing. You really shouldn't ever have the need to mess with that?

    Why would you want to remove that debug statement?
     
  3. peterbrinson

    peterbrinson

    Joined:
    Jul 1, 2013
    Posts:
    57
unityunity