Search Unity

Official 2D Game Kit Official Thread

Discussion in 'Community Learning & Teaching' started by Aurore, Feb 12, 2018.

  1. joaoluizsn5

    joaoluizsn5

    Joined:
    Jul 15, 2022
    Posts:
    3
    I can't find the "HubDoor". It only appears in the Art>Sprites>Interactables as "HubDoor0" 1, 2 and 3. But I can't find the one I can work on. Also, can I use keys from different scenes to open the HubDoor?
     
  2. jellybunnybean05

    jellybunnybean05

    Joined:
    Jan 27, 2022
    Posts:
    22
    Deleting the RuleTile script seems to be working for me as well, thank you!
     
  3. Iszards

    Iszards

    Joined:
    Aug 14, 2022
    Posts:
    1
    Is there no official resolution for the "
    Assets/2DGamekit/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'
    " issue?

    Just deleting the RuleTileEditor.cs file without knowing it's intended purpose. Seems shady. No one is reporting it breaking anything. What is the point then in including it? I'd rather understand an error and its resolution steps. Can we get an official update or resolution?
     
  4. GG_UUnity

    GG_UUnity

    Joined:
    Sep 1, 2022
    Posts:
    1
    After importing, there is no kit tool menu, and new scenes cannot be created, so the first step cannot be carried out.
     
  5. MagendanzC

    MagendanzC

    Joined:
    Jun 11, 2021
    Posts:
    3
    Here's my aggregate list of fixes for the 2D Game Kit with Unity 2021 LTS that I put together for my students:

    To create a new 2D Game Kit project, use the 2D Core template and then import the 2D Game Kit package from the Asset Store using Package Manager.

    ISSUE: You immediately receive several console errors that prevent the sample scenes from running.
    WORKAROUND: Delete the script file named RuleTileEditor.cs. This has been moved to the 2D Tilemap Extras package, so it’s a redundant copy.

    ISSUE: You’ll receive a warning that “The version of Burst used by your project has changed. Please restart the Editor to continue.”
    WORKAROUND: After the import is successful and previous fix is applied, quit and restart the Unity Editor. When you restart, you’ll be prompted to chose another Editor version, so pick the latest 2021 LTS release you have installed. You’ll get another scary warning that you’re “Opening Project in Non-Matching Editor Installation,” but just hit Continue.
    At this point, the Kit Tools menu should be visible and you should be able to run the sample game.

    ISSUE: Several prefabs (e.g. Teleporter, Spikes) with custom shaders appear in magenta.
    WORKAROUND: Select the affected prefab and pick the Universal Render Pipeline/2D/Sprite-Lit-Default shader in the Inspector. The thumbnail in the Project panel won’t update immediately, but it should look right when you drag it to the Scene panel.

    ISSUE: Ellen takes damage, but the HealthCanvas isn’t updated.
    WORKAROUND: On Ellen’s Damageable, the On Health Set event is trying to call a missing HealthUI.SetInitialHeartCount function on HealthCanvas. Instead, select HealthUI.ChangeHitPointUI.

    If you want to implement a weapons pickup, you’ll need to create a prefab from the WeaponPickup game object in Zone 3. Just drag it from the Hierarchy to the Prefabs/Interactables folder in the Project panel and then drag it from there into your new scene. You’ll also need to disable the “Melee attack enabled” and “Range attack enabled” checkboxes in Ellen’s Player Input component.

    If you want to implement a boss level, you’ll need to create prefabs for the Gunner and BossCanvas game objects in Zone 5. Make sure to enable them first, then drag them to the Prefabs/Enemies and Prefabs/UIPrefabs folders, respectively, and then from there to your new scene. In the Missile Golem script in Gunner/GunnerMaster, you’ll need to drag Ellen to Target and BossCanvas/BossHealth to Health Slider, and BossCanvas/BossShield to Shield Slider. You’ll also need to create an empty game object with a Background Music Player component, then set Music Audio Clip to MusicGameplay, Music Output to Music and Ambient Output to Ambient.

    ISSUE: Gunner will take shield damage, but not hits from range or melee attack.
    WORKAROUND: Gunner/GunnerMaster/DamageZone is set to the BossWeakPoint layer, which isn’t on the Damager hit layers for Ellen or her bullets. The simplest fix is to set this game object to the Enemy layer.

    ISSUE: Gunner will only play first round, and take no damage after that.
    WORKAROUND: Rounds 2 and 3 in the Missile Golem component reference Platforms that will be missing in your new scene. You can recreate these or simply set their count to zero.
    When you defeat the boss, students will likely want to do a scene transition to indicate the game is finished. Do this by dragging a TransitionStart prefab into your scene, set Transition When to External and Transition Type to Different Zone. Then select either Start or Loading in the New Scene Name dropdown. Then in Missile Golem under On Defeated, add an event to call SceneController.TransitionToScene() on the SceneController object. As the parameter, pass in your new TransitionStart object.

    Since my students don’t have privileges to run new Windows executables on the lab machines, I prefer to have them publish their games using WebGL.

    ISSUE: Typical games based on 2D Game Kit will be less than the WebGL size limit, but they’ll consume more than the default PlayerSettings.WebGL.memorySize. You’ll also need to disable Auto Graphics API in Player Settings and remove WebGL 1 to clear color space errors.
    WORKAROUND: Unfortunately, since the WebGL.memorySize setting is no longer shown in Player Settings, you have to set this via other means. My solution was to create a preset and hand edit the webGLMemorySize propertyPath to the value 512. Students then download the preset, import it as an asset and then apply it in Player Settings.

    The WebGL Publisher package isn’t included like it is for the microgames, but at this point you can install it from the Unity Registry using Package Manager and follow the same WebGL publishing process.
     
    Last edited: Oct 9, 2022
  6. TATEY-APPS

    TATEY-APPS

    Joined:
    Nov 19, 2021
    Posts:
    7
    I don't know how to control the game on a Mobile device. After installation, I can't control it for example make it move forward or backward, jump, shoot, and fight. Please help kindly help me. Also, how to make scoring?
     
  7. TATEY-APPS

    TATEY-APPS

    Joined:
    Nov 19, 2021
    Posts:
    7
    Dear Sir/Madam,

    After I built it for android mobile, it is not working on player control. Could anyone guide me on how to control the player and make it works? Thanks for your kindness in advance.
     
  8. sauloraul

    sauloraul

    Joined:
    Oct 14, 2022
    Posts:
    1
    I am trying to export the game to Web GL and I keep getting this error when I click Build and Run:

    Code (CSharp):
    1.  
    2. Shader error in 'Water2D': invalid subscript 'grabPos' at line 56 (on gles)
    3. Compiling Subshader: 0, Pass: , Vertex program with <no keywords>
    4. Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    5. Disabled keywords: SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING
    6.  
    How do I fix it so it imports the WebGL?

    Thanks in advance for your help
     
  9. Texasoverseer

    Texasoverseer

    Joined:
    Nov 19, 2019
    Posts:
    1
    everything is pink upload_2023-2-21_12-25-42.png
     
    SwarmTogether likes this.
  10. Droidman2023

    Droidman2023

    Joined:
    Feb 7, 2023
    Posts:
    2
    What the hell is this?
    why does the new asset have such problems?

    1. Assets\2DGamekit\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'
    2. Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(150,50): 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'
    3. Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(238,39): 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'
    4. Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(243,53): 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'
    5. Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(228,11): 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'
    6. Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(229,11): 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'
    7. Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(231,24): 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'
    8.Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(231,51): 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'
    9. Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(69,10): 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'
     
  11. anirudhtariyal999

    anirudhtariyal999

    Joined:
    Apr 16, 2023
    Posts:
    1
    Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs(238,39): 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'
     
  12. fucarinomarco

    fucarinomarco

    Joined:
    May 13, 2023
    Posts:
    1
    Hello everyone, I must to say that this tool is really great and very userfriendly even for a unreal engine user.
    In the last few days I'm in the middle of a test for a game studio and they want a level with this kit but with a greybox level made with Probuilder. I didn't found a solution of that, because I have the feeling that these 2 plugins are not compatible with each other. The best result I have reached is that the 2D character detect the 2d box that I added to the mesh of probuilder but it gets stuck in the falling animation, making it impossible to use the other mechanics such as jumping and using weapons. Is there a solution that I am currently unable to see?
    Thank you in advance for your answers

    PS: I am a newbie on unity
     
  13. ajodreas

    ajodreas

    Joined:
    Sep 28, 2017
    Posts:
    1
    Hello

    I'm currently working in FMOD for implementing audio for the scenes that the Unity team has made for the 2D Game Kit, and I'm encountering a weird behavior.

    After completing zone 4 most of my FMOD events stop working. This is the case regardless of the progression of the other zones. Now if I enter or launch the game from zone 4 and exit to zone 2 before completing zone 4 my FMOD events still work.

    Does anyone have an idea on why this could be? :)

    Kind regards
    Andreas
     
  14. mikemuk01

    mikemuk01

    Joined:
    Dec 1, 2016
    Posts:
    53
    I have downloaded the kit and cleared the console errors but when i run the Zone1 scene Ellen does not have a staff or a gun How can I equip her?
     
  15. SOMUCHDOG

    SOMUCHDOG

    Joined:
    Sep 20, 2018
    Posts:
    3
    You are a very good professor. Keep up the effort and hard work, thanks for sharing :)

    I was planning on exporting to WebGL too, so this also saved me from pain down the road haha
     
  16. hydramax

    hydramax

    Joined:
    Oct 17, 2021
    Posts:
    1
    One of the interactable Prefabs, the Teleporter, is thoroughly pink in color. What is wrong?
     
  17. anis976

    anis976

    Joined:
    Jul 12, 2023
    Posts:
    1
    Hello
    Have you figured out how?
     
  18. MilkMan0000

    MilkMan0000

    Joined:
    Sep 19, 2022
    Posts:
    1
    Severity Code Description Project File Line Suppression State
    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' Assembly-CSharp-Editor C:\Users\201644541\2d pro\Assets\2DGamekit\Utilities\Editor\RuleTileEditor.cs 13 Active
     
  19. GayanUthpala

    GayanUthpala

    Joined:
    Feb 3, 2016
    Posts:
    8
    Unity 2d game kit screen responsive change in different device. How to fix this?
     

    Attached Files:

  20. parimaljsk

    parimaljsk

    Joined:
    Mar 6, 2023
    Posts:
    2
    how to add a OnScreen control in Gamekit2d . Like for movement if i want it for Mobile then i createa ui for left right but because default input script i am not able to configure On Screen canvas Input i also try Other Asset for simple movement but not working, Kindly suggest
     
  21. GayanUthpala

    GayanUthpala

    Joined:
    Feb 3, 2016
    Posts:
    8
    Use Touch Input controller from assets store.
     
  22. unity_762A0D7145BAB4F92FA1

    unity_762A0D7145BAB4F92FA1

    Joined:
    Nov 30, 2023
    Posts:
    1
    Just deleting the RuleTileEditor.cs file
     
  23. yazoozay

    yazoozay

    Joined:
    Jun 9, 2020
    Posts:
    10
    Has anyone managed to make Gunner work? I created a new empty scene with only Ellen and Gunner on it on a flat surface and I followed whatever instructions I found online but nothing seemed to be working. Gunner just sits there without attacking me. Also, I do not deal any damage to him, even after changing the DamageZone layer to Enemy. Any suggestion?
     
  24. yazoozay

    yazoozay

    Joined:
    Jun 9, 2020
    Posts:
    10
    Can't get Gunner to work. He just sits there without attacking me. Also, the suggestion for changing the DamageZone layer didn't work and he did not take any dmg. Any suggestions?
     
  25. aProger

    aProger

    Joined:
    Jul 16, 2020
    Posts:
    1
    Follow these steps to fix it:
    1. Find Assets/2DGamekit/Utilities/Editor/RuleTileEditor.cs file and open it.
    2. Replace all "RuleTile" with "RuleTile2D" in it.
    3. Find Assets/2DGamekit/Scripts/Utility/RuleTile.cs, and rename it to "RuleTile2D.cs", then open it.
    4. Replace "RuleTile" with "RuleTile2D".