Search Unity

Question Im curious who keeps on adding stuff to my files

Discussion in 'Editor & General Support' started by zedz, Dec 9, 2022.

  1. zedz

    zedz

    Joined:
    Aug 31, 2013
    Posts:
    254
    And will they please stop it :)

    Not a big problem cause after a build fails, I just comment out the offending line, Im just curious who is adding these lines to my files
    eg yesterdat I do a build it works, today I do a build & it failed, because someone added using static UnityEditor.Progress; to the top of the file, I delete it/comment it out and it builds.
    (works fine in editor leaving it in BTW)
    Im just curious why these lines keep getting added to my files?
    Not an problem as its an easy fix, Im just curious

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections.Generic;
    3. using System.Linq;
    4. using System.Text;
    5.  
    6. using System.Xml;
    7. using System.Xml.Serialization;
    8. using System.IO;
    9. using System.Runtime.InteropServices;
    10. //using static UnityEditor.Progress;
    11. using static CreatureMap;
    12. [B]//using static UnityEditor.Progress;[/B]
    13. //using UnityEditorInternal.Profiling.Memory.Experimental;
    14. //using static UnityEditor.Progress;
    15. //using static UnityEditor.PlayerSettings;
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,445
    happens to me also with visual studio 2022,
    maybe its this: "Tools > Options > Text Editor > C# > Advanced > Uncheck the option for "Add missing using directives on paste""
    https://stackoverflow.com/a/74163552/5452781
     
    Squoktapus, Ubrano, Noogy and 2 others like this.
  3. zedz

    zedz

    Joined:
    Aug 31, 2013
    Posts:
    254
    OK thanks. That was checked so I've unchecked it, Lets see if it that fixes it.
     
  4. spilat12

    spilat12

    Joined:
    Feb 10, 2015
    Posts:
    38
    Thanks for the tip! This is what was failing my cloud build, some weird using directives that are essentially useless! Let's see if that helps :)