Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2D Game Kit errors #345

Open
JodieKitten opened this issue Sep 14, 2022 · 7 comments
Open

2D Game Kit errors #345

JodieKitten opened this issue Sep 14, 2022 · 7 comments

Comments

@JodieKitten
Copy link

Hi, I downloaded the 2D Game Kit from the Unity Asset store, and once imported, I get multiple of these errors (28!) :

unity assets\2d gamekit\utilities\editor\ruletileeditor.cs(13,23): error cs0433: the type 'ruletile' exists in both 'assembly-csharp, version=0.0.0.0, culture=neutral, publickeytoken=null' and 'unity.2d.tilemap.extras, version=0.0.0.0, culture=neutral, publickeytoken=null'

I'm using Unity 2021.3.9f1

Am I supposed to download anything else as well?

@ChuanXin-Unity
Copy link
Collaborator

ChuanXin-Unity commented Sep 15, 2022

Hi, you do not need to download anything else.

Unfortunately, the 2D Game Kit is not compatible with the 2D Tilemap Extras package as they both share the same source files. You can fix this issue by:

  • Removing the duplicate in 2D Game Kit: Assets\Sd Gamekit\Utilities\Editor\RuleTileEditor.cs
    or (edit)
  • Remove the 2D Tilemap Extras package using the Unity Package Manager under Windows\Package Manager

@JodieKitten
Copy link
Author

Hi, thank you for the assistance.

I removed the duplicate RuleTileEditor.cs but the 2D TileMap Extras is showing as locked and unremovable.
I also now have this error showing:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'UnityEditor.U2D.Animation.ValidateCollinear_00000747$BurstDirectCall' threw an exception. ---> System.InvalidOperationException: Burst failed to compile the function pointer Int32 ValidateCollinear(Unity.Mathematics.float2*, Int32, Single)
at Unity.Burst.BurstCompiler.Compile (System.Object delegateObj, System.Reflection.MethodInfo methodInfo, System.Boolean isFunctionPointer, System.Boolean isILPostProcessing) [0x0015a] in D:\Unity\2D\Library\PackageCache\[email protected]\Runtime\BurstCompiler.cs:469
at Unity.Burst.BurstCompiler.CompileILPPMethod2 (System.RuntimeMethodHandle burstMethodHandle) [0x0003a] in D:\Unity\2D\Library\PackageCache\[email protected]\Runtime\BurstCompiler.cs:230
at UnityEditor.U2D.Animation.TriangulationUtility+ValidateCollinear_00000747$BurstDirectCall.Constructor () [0x00000] in :0
at UnityEditor.U2D.Animation.TriangulationUtility+ValidateCollinear_00000747$BurstDirectCall..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at $BurstDirectCallInitializer.Initialize () [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <9aad1b3a47484d63ba2b3985692d80e9>:0
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <9aad1b3a47484d63ba2b3985692d80e9>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <9aad1b3a47484d63ba2b3985692d80e9>:0
at UnityEditor.EditorAssemblies.ProcessInitializeOnLoadMethodAttributes () [0x000a5] in <0d6ce211ebbc47e1a35a84c3672ff58f>:0
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadMethodAttributes ()

@ChuanXin-Unity
Copy link
Collaborator

Whoops, sorry, I wasn't too clear about the instructions! Only one of the two is needed.

You can fix this issue by:

  • Removing the duplicate in 2D Game Kit: Assets\Sd Gamekit\Utilities\Editor\RuleTileEditor.cs
    or
  • Remove the 2D Tilemap Extras package using the Unity Package Manager under Windows\Package Manager

The burst error you are seeing can be ignored for now. If you restart the Editor, you should not have any issues with it.

@schlemmi
Copy link

I'm trying [& failing] to remove the package (2d tilemap extras). I do unlock, then remove is disabled. says 'see dependencies'.

@ChuanXin-Unity
Copy link
Collaborator

@schlemmi

image

The 2D Tilemap Extras package may have been added as part of the 2D Features package. The image above is an example where the 2D Animation package was added as part of the 2D Features package. If that is the case for you, you will have to remove the 2D Features package first to remove the 2D Tilemap Extras package.

@MarcAnthorn
Copy link

I've encountered the same problem as well..😭
However, besides the problem that even if I delete the 2D packages and try to replace the original extras with the new ones, It still doesnt work any way. So I try to delete the repetitive ones in the new tile extras, yet comes the error:Assets/2d-extras-2.2.2/Editor/Tiles/Menu/TerrainTileMenu.cs(9,74): error CS0122: 'ETilesMenuItemOrder' is inaccessible due to its protection level
I can not get the new brushes and tile types accessed to the Unity seems if......Help!😭

@ChuanXin-Unity
Copy link
Collaborator

@MarcAnthorn

Would it be possible to share your setup for your project with the packages?

  • Any installed 2D packages shown in package manager
  • Copied the full 2D extras to the Assets/2d-extras-2.2.2 folder

In the meantime, you could check out the Assets/2d-extras-2.2.2/Editor/Menu/MenuItemOrder.cs file, and try changing the protection level from internal to public.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants