Search Unity

When, if ever, are Pure ECS/Dots editor tools coming?

Discussion in 'Entity Component System' started by thedrok_, Jun 27, 2019.

  1. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    350
    Why? I rename classes always with file names and it never breaks anything. It can't because Unity serialization system identifies MonoBehavior classes by asset GUIDs. Unless you also delete Meta files manually (or your IDE is messing something up, I use Rider), there shouldn't be a problem.
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,770
    What @runner78 means is, that if you have some class like
    Code (CSharp):
    1. class MyMBClass: MonoBehaviour
    You should have also MyMBClass.cs
    If you change, or misspell class name, or file name, one but not both, then unity will throw an error. class- file names must match.
     
  3. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    792
    I mean if you rename the filename outside of Unity, the renamed file will be recognized as a new file with new GUID.
    So far in know, the file and classname can different (Unlike in PHP with composer autoloading).
     
  4. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,090
    Not true, it works fine in VS2019
     
    phobos2077 likes this.
  5. phobos2077

    phobos2077

    Joined:
    Feb 10, 2018
    Posts:
    350
    That's because if you rename file in VS2019 it is smart enough to also rename meta file along with it. So GUID is not changed. Who would rename assets manually anyway without renaming also meta files? That's always not a good idea unless you want new GUID for whatever reason.
     
  6. Vacummus

    Vacummus

    Joined:
    Dec 18, 2013
    Posts:
    191
    Yup, though I didn't know that changing the name or moving it via Unity Editor retains the references. Good to know.