Search Unity

[Solved] No registered factory method

Discussion in 'Package Manager' started by Birlouz, Aug 20, 2018.

  1. Birlouz

    Birlouz

    Joined:
    May 3, 2014
    Posts:
    4
    Hello,

    I have this errors when I open the package manager window :


    It only happens on one of my projects, on the others everything is OK.
    On this project I just have my scripts, Odin Inspector, DoTween and Steamworks .NET.
    On the other projects I use Odin, DoTween and Steamworks .NET too, without any problems.

    I tried to create a new project and import just the minimum files to run my project and if it has compilation errors, the package manager window work perfectly, as soon as there is no errors, the package manager window stop working.

    Unity version 2018.2.3f1

    I'm really lost ^^

    Birlouz

    Here is the errors in the Editor.log :
     

    Attached Files:

    Last edited: Aug 21, 2018
  2. Birlouz

    Birlouz

    Joined:
    May 3, 2014
    Posts:
    4
    Also, everytime a new compilation is OK, I have this errors :

     
  3. Birlouz

    Birlouz

    Joined:
    May 3, 2014
    Posts:
    4
    Problem solved, everything was caused by this piece of code :
    Code (CSharp):
    1.    [StructLayout(LayoutKind.Explicit)]
    2.     struct FastEnumConverter<T> where T : IConvertible
    3.     {
    4.         [FieldOffset(0)] public T Raw;
    5.         [FieldOffset(0)] public sbyte AsSByte;
    6.         [FieldOffset(0)] public byte AsByte;
    7.         [FieldOffset(0)] public short AsShort;
    8.         [FieldOffset(0)] public ushort AsUShort;
    9.         [FieldOffset(0)] public int AsInt;
    10.         [FieldOffset(0)] public uint AsUInt;
    11.         [FieldOffset(0)] public long AsLong;
    12.         [FieldOffset(0)] public ulong AsULong;
    13.     }
    I don't know if it is the use of the StructLayout attribute or a bad initialization of the FieldOffset attribute, but as soon as I commented this part, all went fine again :)
     
  4. Trend86

    Trend86

    Joined:
    Jul 25, 2019
    Posts:
    7
    Where do I find this code?
     
    unity651671 and Gladiator-Apps like this.
  5. unity651671

    unity651671

    Joined:
    Dec 28, 2019
    Posts:
    2
    did you solve this problem?