Upgrading to newest version

Hi,

i upgraded from version 0.13 or something, this to the newest 0.51.

I got alot of errors, but the error messages were pretty helpful to fix each issue, except for one:

 error CS0103: The name 'ComponentType' does not exist in the current context

I am not really sure on how to fix this.

The error itself points to the type “FixedString4096Bytes”:

public struct ToastMessage : IMessage
  {
    public ToastType Type;
    public FixedString4096Bytes Message; //<<< here is the error according to compiler

    public FixedString64Bytes SystemName { get; set; }

    public static ToastMessage Of(string message)
    {
      return new ToastMessage()
      {
        Type = ToastType.Panel,
        Message = message
      };
    }
  }

Unity Version: 2021.3.1.0f1
Module versions are in the screenshot below

I think you need Unity 2021.3.4 or higher if using 2021 versions.

Thanks for your answer, i upgraded to 2021.3.4f1 and i still have the same error.

EDIT: i looked around it and the error message just points to a wrong line.

The actual error is in a code generated partial class:

            __query_0 = GetEntityQuery(new Unity.Entities.EntityQueryDesc{All = new Unity.Entities.ComponentType[]{ComponentType.ReadOnly<Modules.RaceMode.Systems.Race>()}, Any = new Unity.Entities.ComponentType[]{}, None = new Unity.Entities.ComponentType[]{}, Options = Unity.Entities.EntityQueryOptions.Default});

the issue lies in:

ComponentType.ReadOnly<Modules.RaceMode.Systems.Race>()

If i comment out the GetSingleton() method, it works as expected