Search Unity

Unity 2D Game Kit Official Thread

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

  1. McFarlandCreativeWorks

    McFarlandCreativeWorks

    Joined:
    Sep 4, 2018
    Posts:
    4
    Hey there,
    Just getting started with this tutorial, using 2018.2.4f1 on my Mac. In lesson 1, it says that there is a debug menu in game mode when f12 is pressed.

    We have included a debug menu. While still in Play mode, press F12 on your keyboard to bring up the option to enable or disable each of Ellen’s weapons in the Game view. For now, make sure both weapons are enabled.


    On my Mac, that takes me to the dashboard. I can manually reassign the keyboard stroke to a shortcut in the app, but I need to know the exact shortcut name. Guessed 'debug' and 'Debug' but neither work. (guessing this menu is custom to the 2d kit, and not something not standard... so how can I manually toggle it on and off?)

    Any suggestions on how to resolve this issue?

    UPDATE:
    figured it out:
    • Open Keyboard Shortcuts Preferences
    • Click "Mission Control" from the list
    • Untick "Show Dashboard" (disable default beahviour of F12)
    Steps above prevent dashboard from coming up and interrupting game process. Make sure to click on the game window to ensure it is active. That was the mistake I made before.
     
    Last edited: Sep 4, 2018
    ryzor likes this.
  2. smnwttbr

    smnwttbr

    Unity Technologies

    Joined:
    Mar 27, 2017
    Posts:
    4
    It might be a problem with write permissions, can you check that you have write access to the packages folder?

    It should be here: C:\Users\[YourUserName]\AppData\Local\Unity\cache\packages\packages.unity.com
     
  3. mhswebmaster

    mhswebmaster

    Joined:
    Aug 29, 2018
    Posts:
    7
    Students and myself can write to the folder you listed...
    C:\Users\[YourUserName]\AppData\Local\Unity\cache\packages\packages.unity.com

    Tested it by going to that location creating a folder and also saving a simple text file.

    Thanks
     
  4. McFarlandCreativeWorks

    McFarlandCreativeWorks

    Joined:
    Sep 4, 2018
    Posts:
    4

    2018-09-09 (see below for fix!)

    Doing work on a Mac. (do a search for F12 elsewhere on this thread if you are having issues with it on a Mac. I figured out how to fix that a few days ago).

    Last week I got all the way to the door tutorial, and had a similar issue with the pressure pad. None of the other effects for the pressure pad worked either. No sound when pressed, for example.

    I uninstalled Unity, installed fresh the newest version (2018.2.6f1) and reopened my project. It complained that the project was older than the version of Unity I was using. And pressure pad still didn't work.

    So, I created a new project from the 'Learn/tutorial Projects' tab. Recreated everything up to that point (went a lot faster this time, so I don't feel this effort was wasted, yay! ).

    [Tangent: noticed that the moving platform had a different base number for node 1 than when I used it before. Also, when I put 3 nodes into the moving platform, the third one would often disappear when I hit play to demo my level. Eventually it stuck and worked as expected.]

    Pressure pad still not working. I saw at the bottom of the tutorial page that I could also trigger the door with a ReusableSwitch. Tried it, and it worked just fine. So, now I need to track down why the pressure pad isn't working. Going to continue on with the tutorials, and will hopefully gain enough of an understanding of Unity so I can come back and figure out what the issue is :)

    https://unity3d.com/learn/tutorials/projects/2d-game-kit/opening-door-events?playlist=49633

    UPDATE: FOUND ISSUE & FIXED.
    For some reason, the default 2D box collider was too small on the pressure pad. Being that the settings for the moving platform changed when I imported this tutorial into a newer version of Unity, I figured other defaults on other prefabs might be worth tweaking. I figured out that this is essentially the 'trigger' for the pad. I changed it to some numbers that may make it a bit too high, but it gets the job done.

    New numbers for 2D collider that I'm using are:
    Offset: X 0 Y 0.08
    Size: X 1.96 Y 0.38
     
    Last edited: Sep 10, 2018
    jacmba, shruthidr571 and johnnikay27 like this.
  5. meta44

    meta44

    Joined:
    Sep 11, 2018
    Posts:
    1
    Hi, I downloaded the kit, and started following the tutorial. In step 02. Creating a new scene, it says in the top menu, click "kit tools", followed by an image showing the top menu with File, Edit, Assets, GameObject, Component, Cinemachine, Kit Tools, Tutorial, Window and Help. My top menu does not contain Cinemachine, Kit Tools or Tutorial. Any idea what I can do to fix this, or what a good work-around would be? I tried creating a new scene using Create - Scene in the Project tab, but it didn't seem to load the other data properly.
     
  6. McFarlandCreativeWorks

    McFarlandCreativeWorks

    Joined:
    Sep 4, 2018
    Posts:
    4

    How did you open the project? I remember not having them initially too, and I'm trying to remember how I fixed the issue.

    I think it was this: I made a new project, and a window popped up, with the words "Projects" and "Learn" in the upper left. I clicked on the word "Learn" (which is really a tab... not very obvious), and there were a bunch of things I could download or start on. I had already downloaded the 2D Game Kit, so hit start there. I then installed the 2D Game kit, and added those extra tabs.
    Cheers, TMC
     
    abhayhugo likes this.
  7. abhayhugo

    abhayhugo

    Joined:
    May 1, 2018
    Posts:
    2
    I have the same issue as meta44. I got the latest 2D Kit from the Unity asset store.
    I first opened an empty project. Then, I went to the asset store tab in Unity and installed the 2D Kit. Initially, I was getting 200+ errors. After closing it and opening it, I now get this error -
    Assets/2DGamekit/Scripts/Character/Editor/PlayerInputEditor.cs(17,45): error CS0117: `UnityEditor.PrefabUtility' does not contain a definition for `GetCorrespondingObjectFromSource'
    I just can't see the 'Kit Tools' option in my Unity. I've attached a screenshot of my menu too.

    Do tell me if anybody has any solutions as to how I can fix this issue! I can't even start the tutorial now.
     

    Attached Files:

    Last edited: Sep 13, 2018
  8. abhayhugo

    abhayhugo

    Joined:
    May 1, 2018
    Posts:
    2
    So, I found a hacky solution. I just commented out the code snippet which was causing the issue.
    Now the kit is working!
     
  9. AndrewBCrisp

    AndrewBCrisp

    Joined:
    Sep 10, 2018
    Posts:
    5
    Running into a problem with the tutorial, Lesson 6. I'd completed the first five lessons without incident, but when I start making changes to the scene for Lesson 6 (teleporters and moving between scenes), I'm getting a consistent console error that multiplies every time I do something - anything - in Unity. The error is as follows:

    IndexOutOfRangeException: Array index is out of range.
    Gamekit2D.SceneNameDrawer.Setup (UnityEditor.SerializedProperty property) (at Assets/2DGamekit/Scripts/SceneManagement/Editor/SceneNameDrawer.cs:36)

    I'm using Unity 2018.2.8f1, but I started the tutorial in .2.7f1 and upgraded partway through.

    The error did not seem to cause any issues for the in-scene teleportation, but it made the inter-scene teleportation impossible to complete. I could no longer insert items into the inspector or change any settings for an object within the inspector.

    Any thoughts on what went wrong or how to fix it?

    EDIT Sept 16: Apparently this was a variant of the bug noted in Lesson 6, for which the fix was earlier in this thread. I removed and reinserted the scenes in the Build Settings and was able to complete the lesson. The console error remains but didn't impede the functioning of the game. So... false alarm?
     
    Last edited: Sep 16, 2018
  10. johnnikay27

    johnnikay27

    Joined:
    Sep 15, 2018
    Posts:
    1

    Thank you! I was getting really discouraged since I couldn't open the door. Your awesome!
     
  11. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    2,461
    Hi,
    Thank you for sharing this project with us! I'm unable to pass the swamps in zone 3... I'm just too old, I've lost eye/hand coordination. Oh well...
    I'm going to study how it was made using your tutorials here and lessons here but I'm really wondering what we could do with it; has anyone done something different with it yet?

    Edit: Oh, by the way, after downloading the project, the scene was empty, no Ellen, no floating platform, nothing. I had to search the Scenes/Utilities folder in the Project window to find the "_TemplateScene" and load it.
     
    Last edited: Sep 17, 2018
  12. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    2,461
    Hi guys,

    I just received an email from Unity inquiring about my progress in studying lesson 1 and I cannot help but finding this bothering. So, you are monitoring my progression? I delete the cookies every time I shut down Firefox, which means that you are going to send me this email a bunch of time in the future. I delete the cookies and, yes, I know where I am, I don't need to be reminded.

    How can I turn these emails off?

    For memory, the emails says:

    Okay, I found the "unsubscribe" link, in very small characters at the bottom of the page; I'm going to use it. What you should do is ask us if we want you to send us these kinds of reminders instead of sending them automatically.
     
  13. Palace

    Palace

    Joined:
    Sep 24, 2018
    Posts:
    2
    Hi There
    Just starting out as a noob. Got through Lesson 1 OK. On Lesson 2 it says to add a moving platform. It's not the same in my assets and seems to come in 3 parts, that you can see when you click the little expansion arrow on the right of the asset. If I just drag the asset to the scene it asks me to save a New Animation? I can try and drag each of the 3 pieces, but they aren't connected in any way I can see. It's a little confusing.
    I also don't see a preview selector in the Inspector. Are the Lessons out of date now, or are there new ones? Here's a pic of what I see. 2018-09-24_17-11-44.png

    Cheers Peter
     
  14. bobjuzz

    bobjuzz

    Joined:
    Sep 24, 2018
    Posts:
    1
    Hey I was just having this exact problem. You are in the art folder. Assets>2DGamekit>Art>Prefabs>Interactables is where you are now, move to the folder Assets>2DGameKit>Prefabs>Interactables
     
  15. kmccathie_unity

    kmccathie_unity

    Joined:
    Sep 29, 2018
    Posts:
    2
    I am not sure if this error is related to the previous threads here but we are trying to get Unity 2D game kit to work at school and got this error shown in the screen shot. Hope you can see it. Any ideas please? We are trying to get a club off the ground and after 2 weeks are still not managing to get stuff to work. Could it be a setting that the IT Technicians need to change? The students don't have access to the C drive.
     

    Attached Files:

    joshjoshid likes this.
  16. Palace

    Palace

    Joined:
    Sep 24, 2018
    Posts:
    2
    Doh...Thanks bobjuzz. You are correct. I'll have to pay more attention to the lessons...Cheers
     
  17. pRob3

    pRob3

    Joined:
    Oct 13, 2017
    Posts:
    3
    Im having problem when my enemy sprite facing left. I have tried to eneable this by set the bool
    spriteFaceLeft = true but then when the enemy hit an obstacle and flip the sprite X it get stuck.
    Anyone have a fix for this?
     
  18. mikyjo2012

    mikyjo2012

    Joined:
    Oct 5, 2018
    Posts:
    1
    Stuck on lesson 10- "Teleporting the Player". I want to make transition to a different scene,but in the prefab 'TransitionStart' component 'Transition Point', the option 'Different Zone' (the name is 'Different Level' in the tutorial, it's weird) doesn't work properly. For example, I can't add any game objects to it while the other option 'Same scene' works properly. This is the tutorial I am referring to: https://unity3d.com/kr/learn/tutorials/projects/2d-game-kit/teleporting-player?playlist=49633
     
  19. TheLibraryAssistant

    TheLibraryAssistant

    Joined:
    Oct 7, 2018
    Posts:
    1
    I get the same problem. Please help somebody. Thanks.:)
     
  20. AndrewBCrisp

    AndrewBCrisp

    Joined:
    Sep 10, 2018
    Posts:
    5
    Hi. This sounds like the same problem I ran into a while back. For some reason, there is a glitch between the current version of Unity and the 2D game kit. Fortunately, Unity has a fix, which is outlined in this post: https://forum.unity.com/threads/2d-game-kit-official-thread.517249/page-4#post-3575476

    It's an extra hurdle, but it cleared up my problem and I think it should fix yours. Hope this helps.
     
  21. muggsy03

    muggsy03

    Joined:
    Oct 1, 2018
    Posts:
    1
    Ive got no kit tools tab to start with this project, can anyone help?
     
  22. eternalagamingco

    eternalagamingco

    Joined:
    Oct 12, 2018
    Posts:
    1
    Its missing parts of the files to complete the project
     
  23. vvpathak

    vvpathak

    Joined:
    Oct 14, 2018
    Posts:
    1
    hello I have a question I have created a game using the kit can I publish it
     
  24. RobertPastiss

    RobertPastiss

    Joined:
    Dec 23, 2017
    Posts:
    2
    Hey guys!

    I have a question, can we use the 2D Game Kit to make a commercial game ? Like a game on the App Store ?

    Thank you.
     
    Idomama likes this.
  25. JackoBanter

    JackoBanter

    Joined:
    Oct 17, 2018
    Posts:
    2
    Hi, I'm as fresh as they come since I've only started studying unity yesterday. I'm having a problem. I'm working with the 2D kit. Yesterday I took lesson 1 and when I closed unity everything was working just fine, when I opened it today I found the testing mode (game mode = press "play") to be frozen, everything else works. I've checked for errors in the console and it says there are none, I turned ON error pause to be on the safe side and no change.... ideas that can help?
    I'm running unity 2018.2.11f1 on windows 10 Home build 17134.345.
    Thanks.
     
    Last edited: Oct 18, 2018
  26. JackoBanter

    JackoBanter

    Joined:
    Oct 17, 2018
    Posts:
    2
    Following on this post....I tried updating to the 2018.2.13 release of unity and after running a test and a scan (console) it gave 3 errors:
    game mode frozen.jpg
    Then I tried disabling error pause and run it again, but it made no difference.... I will try and start from scratch. It's very confusing not knowing what is going on, any help would be truly appreciated.
     
  27. unity_gG5_uHSwWCvqlw

    unity_gG5_uHSwWCvqlw

    Joined:
    Oct 27, 2018
    Posts:
    1
    i am having the problem that i cant download 2dgamekit in my unity5.4.1f1.how can i download it.
     
  28. saranimendisb

    saranimendisb

    Joined:
    Oct 31, 2018
    Posts:
    1
    Hi All,

    Im getting the following error:-

    Assets/2DGamekit/Utilities/CinemachinePostProcessingV2/CinemachinePostProcessing.cs(220,16): error CS0246: The type or namespace name `PostProcessLayer' could not be found. Are you missing an assembly reference?

    I've installed Cnemachine, TextMeshPro and postProcess V2 all couple of times. but I still get errors when building. I've been trying to fix this for a week. Does anyone know how to fix it. Thanks, in advance.
     
  29. geol8125

    geol8125

    Joined:
    Nov 4, 2018
    Posts:
    1
  30. LeoSoe

    LeoSoe

    Joined:
    Nov 11, 2018
    Posts:
    1
    I put Key Canvas prefab in the UI section but nothing happened to that canvas when I collected the Key1.
    Element 0 in Key UI of Key Canvas is Key1.
    Key in Inventory Controller of Ellen is Key1.
    Inventory Key in Inventory item of Key is Key1.
    I don't know where is the problem.
     
  31. Idomama

    Idomama

    Joined:
    Dec 31, 2017
    Posts:
    68
    can i use the 2D Game Kit to make a commercial games? Like a game on the App Store? I find all kinds of answers but nothing official that i can really rely on. Please someone who knows where there is official information about this package.
     
  32. Ankush_admin

    Ankush_admin

    Joined:
    Apr 23, 2018
    Posts:
    2
    hey guys can you please let me know can i build 2d game kit for android device ? and any other device
     
  33. Pizzavan

    Pizzavan

    Joined:
    Nov 15, 2018
    Posts:
    2
    I'm trying to follow the 2D Game Kit instructions and have fallen at the first hurdle. Just after the bit where it tells you to create a new project, it goes on to tell you to find the asset store tab and click on it. I can't see one anywhere and my screen doesn't look quite the same as the one in the tutorial. I need to import the assets for the 2D Game Kit from within the editor so if spomeone could explain where I'm going wrong I'd be very grateful.
     
  34. Asterixman

    Asterixman

    Joined:
    May 28, 2017
    Posts:
    1
    Hello Guys.Does anyone help me with tile system?I dont want to use tilemap.instead i want to use regular collider physic.But i couldnt find a way to do it on script.Can anyone help me?
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.Tilemaps;
    5.  
    6. namespace Gamekit2D
    7. {
    8.     /// <summary>
    9.     /// This class is used as a cache of components on the same gameobjects as colliders.
    10.     /// The intention is that when a collider is found - by raycast or otherwise - the components being sought by those raycasts can be referenced without the need for GetComponent calls.
    11.     /// </summary>
    12.     public class PhysicsHelper : MonoBehaviour
    13.     {
    14.         static PhysicsHelper s_Instance;
    15.         static PhysicsHelper Instance
    16.         {
    17.             get
    18.             {
    19.                 if (s_Instance != null)
    20.                     return s_Instance;
    21.  
    22.                 s_Instance = FindObjectOfType<PhysicsHelper> ();
    23.  
    24.                 if (s_Instance != null)
    25.                     return s_Instance;
    26.            
    27.                 Create ();
    28.            
    29.                 return s_Instance;
    30.             }
    31.             set { s_Instance = value; }
    32.         }
    33.  
    34.         static void Create ()
    35.         {
    36.             GameObject physicsHelperGameObject = new GameObject("PhysicsHelper");
    37.             s_Instance = physicsHelperGameObject.AddComponent<PhysicsHelper> ();
    38.         }
    39.    
    40.         Dictionary<Collider2D, MovingPlatform> m_MovingPlatformCache = new Dictionary<Collider2D, MovingPlatform> ();
    41.         Dictionary<Collider2D, PlatformEffector2D> m_PlatformEffectorCache = new Dictionary<Collider2D, PlatformEffector2D> ();
    42.         Dictionary<Collider2D, Tilemap> m_TilemapCache = new Dictionary<Collider2D, Tilemap> ();
    43.         Dictionary<Collider2D, AudioSurface> m_AudioSurfaceCache = new Dictionary<Collider2D, AudioSurface> ();
    44.  
    45.         void Awake ()
    46.         {
    47.             if (Instance != this)
    48.             {
    49.                 Destroy (gameObject);
    50.                 return;
    51.             }
    52.        
    53.             PopulateColliderDictionary (m_MovingPlatformCache);
    54.             PopulateColliderDictionary (m_PlatformEffectorCache);
    55.             PopulateColliderDictionary (m_TilemapCache);
    56.             PopulateColliderDictionary (m_AudioSurfaceCache);
    57.         }
    58.  
    59.         protected void PopulateColliderDictionary<TComponent> (Dictionary<Collider2D, TComponent> dict)
    60.             where TComponent : Component
    61.         {
    62.             TComponent[] components = FindObjectsOfType<TComponent> ();
    63.  
    64.             for (int i = 0; i < components.Length; i++)
    65.             {
    66.                 Collider2D[] componentColliders = components[i].GetComponents<Collider2D> ();
    67.  
    68.                 for (int j = 0; j < componentColliders.Length; j++)
    69.                 {
    70.                     dict.Add (componentColliders[j], components[i]);
    71.                 }
    72.             }
    73.         }
    74.  
    75.         public static bool ColliderHasMovingPlatform (Collider2D collider)
    76.         {
    77.             return Instance.m_MovingPlatformCache.ContainsKey (collider);
    78.         }
    79.  
    80.         public static bool ColliderHasPlatformEffector (Collider2D collider)
    81.         {
    82.             return Instance.m_PlatformEffectorCache.ContainsKey (collider);
    83.         }
    84.  
    85.         public static bool ColliderHasTilemap (Collider2D collider)
    86.         {
    87.             return Instance.m_TilemapCache.ContainsKey (collider);
    88.         }
    89.  
    90.         public static bool ColliderHasAudioSurface (Collider2D collider)
    91.         {
    92.             return Instance.m_AudioSurfaceCache.ContainsKey (collider);
    93.         }
    94.  
    95.         public static bool TryGetMovingPlatform (Collider2D collider, out MovingPlatform movingPlatform)
    96.         {
    97.             return Instance.m_MovingPlatformCache.TryGetValue (collider, out movingPlatform);
    98.         }
    99.  
    100.         public static bool TryGetPlatformEffector (Collider2D collider, out PlatformEffector2D platformEffector)
    101.         {
    102.             return Instance.m_PlatformEffectorCache.TryGetValue (collider, out platformEffector);
    103.         }
    104.  
    105.         public static bool TryGetTilemap (Collider2D collider, out Tilemap tilemap)
    106.         {
    107.             return Instance.m_TilemapCache.TryGetValue (collider, out tilemap);
    108.         }
    109.  
    110.         public static bool TryGetAudioSurface (Collider2D collider, out AudioSurface audioSurface)
    111.         {
    112.             return Instance.m_AudioSurfaceCache.TryGetValue (collider, out audioSurface);
    113.         }
    114.  
    115.         public static TileBase FindTileForOverride(Collider2D collider, Vector2 position, Vector2 direction)
    116.         {
    117.             Tilemap tilemap;
    118.             if (TryGetTilemap (collider, out tilemap))
    119.             {
    120.                 return tilemap.GetTile(tilemap.WorldToCell(position + direction * 0.4f));
    121.             }
    122.  
    123.             AudioSurface audioSurface;
    124.             if (TryGetAudioSurface (collider, out audioSurface))
    125.             {
    126.                 return audioSurface.tile;
    127.             }
    128.  
    129.             return null;
    130.         }
    131.     }
    132. }
     
  35. AdrianG001

    AdrianG001

    Joined:
    Nov 21, 2018
    Posts:
    2
    I get an error while downloading the game kit.

    Regards,
    Adrian Gates
    Developer - CloudDesktopOnline
     
    Last edited: Nov 22, 2018
  36. Bensonious

    Bensonious

    Joined:
    Nov 18, 2018
    Posts:
    1
    Hello,
    Been trying to familiarize myself with Unity(on Mac) the past few days and got stuck on the Painting a Level because the tile sets were all blank. Tried re-installing everything but the problem persisted. Decided to view it a learning experience and try to figure out what was going on. After delving into the Tilesets, textures, etc I finally narrowed it down to something to do with the Alpha Source under the Advanced section of Tiles Properties. If it is set to either: Input Texture Alpha or From Grey Scale it sets the whole image to transparent. I set it to none and it worked well enough to finish the tutorial but left white around the edges of tiles. I've tried to look into it further to figure out why the alpha isn't working correctly but think I'm hitting the limits what is productive to troubleshoot with my current knowledge. Anyone know what may be happening here? Any good resources on learning the details about alpha levels and transparency in general and in Unity?

    Thanks in Advance.
     

    Attached Files:

  37. gustxw

    gustxw

    Joined:
    Jun 2, 2018
    Posts:
    1
    hey there just started and got it to play after some errors now tho ellen is not moving when .i press a or d or any keys, anyone got any ideas on how to fix this?
     
  38. Rika97

    Rika97

    Joined:
    May 5, 2018
    Posts:
    1
    Hi, so I'm fairly new to unity, and I was wondering if I could get some help.
    I've been swapping Ellen's animations out for my own characters, and I've been having issues with the FX attached to her feet. The Dust puff I think it was.
    My character is bigger then Ellen, and so the FX are appearing around his middle instead of at his feet. I thought the FX was determined by the 2D capsule collider, but I suppose I was wrong, I dug through every bit of Ellen's code, and the code of the VFX controller, to figure out where the placement of the FX was determined, but came up with no dice.
    I'm hoping someone here may have the answer.
     
  39. TomateYCebolla

    TomateYCebolla

    Joined:
    Dec 9, 2012
    Posts:
    2
    Hello! I was wondering how can I activate both Mouse + Keyboard and Controller inputs at the same time, because inside InputComponent theres an enum that only allows to select one of them on Ellen's prefab.

    Thanks!
     
  40. carlos_m_orozco

    carlos_m_orozco

    Joined:
    Sep 17, 2018
    Posts:
    3
    I've been trying the 2D Game Kit and was able to make a lot of progress. I've translated to an IOS target and added some on screen controls as well as a game controller interface. I'm noting some issues I'm not sure how to resolve. The animation seems glitchy like the frames of the animation flip from time to time. --- nudge...
     

    Attached Files:

    Last edited: Dec 4, 2018
  41. carlos_m_orozco

    carlos_m_orozco

    Joined:
    Sep 17, 2018
    Posts:
    3
     
  42. sayani4123

    sayani4123

    Joined:
    Dec 1, 2018
    Posts:
    1
    Can I use this Asset to create my own new game(ios & android) for promotional purpose? Is it allow to use these assets or they are specifically restricted for learning purpose?
     
  43. yabune

    yabune

    Joined:
    Jan 21, 2018
    Posts:
    1
    Hello Guys! I have a problem with the Kit.

    I am trying to change the damage value of the range attack but it always hit 1 damage even if i set the value 5.
    When I make melee attack it hits 5 damage and there is no problem with it.

    How can I fix this problem?

    upload_2018-12-4_16-5-16.png

    EDIT:

    I realize that ranged attack damage comes from bullet prefab. I wanted to change its damage
    dynamically. To do that I needed to change pools' damage inside the BulletPool script.

    Code (CSharp):
    1.  
    2.                var pools = ellen.GetComponent<BulletPool>().pool;
    3.  
    4.                 foreach(var pool in pools)
    5.                 {
    6.                    var a= pool.bullet.GetComponent<Damager>();
    7.  
    8.                     if (a != null)
    9.                     {
    10.                         a.damage = newDamage;
    11.                     }
    12.                 }
    Thanks!
     
    Last edited: Dec 4, 2018
  44. unity_AcEqGGPJjmnHuQ

    unity_AcEqGGPJjmnHuQ

    Joined:
    Aug 8, 2018
    Posts:
    2
    hi
    i believe i am not only speaking for my self on this issue,
    i want to add mobile controls from standard assets to the 2d game kit so that it can be played on the mobile platform, how do i go about it, because i have downloaded the standard assets and tried to make use of the 2d user control script and the joystick prefab but no success yet, how do i go about this, i would appreciate your help
     
  45. eAmitBarman

    eAmitBarman

    Joined:
    Dec 6, 2018
    Posts:
    1
    My suggestion is please uninstall the current unity and install the latest version.
     
  46. KTTdestroyer

    KTTdestroyer

    Joined:
    Aug 31, 2014
    Posts:
    7
    Code (CSharp):
    1.         public void OnHurt(Damager damager, Damageable damageable)
    2.         {
    3.             //if the player don't have control, we shouldn't be able to be hurt as this wouldn't be fair
    4.             if (!PlayerInput.Instance.HaveControl)
    5.                 return;
    6.  
    7.             UpdateFacing(damageable.GetDamageDirection().x > 0f);
    8.             damageable.EnableInvulnerability();
    9.  
    10.             m_Animator.SetTrigger(m_HashHurtPara);
    11.  
    12.             //we only force respawn if helath > 0, otherwise both forceRespawn & Death trigger are set in the animator, messing with each other.
    13.             if(damageable.CurrentHealth > 0 && damager.forceRespawn)
    14.                 m_Animator.SetTrigger(m_HashForcedRespawnPara);
    15.  
    16.             m_Animator.SetBool(m_HashGroundedPara, false);
    17.             hurtAudioPlayer.PlayRandomSound();
    18.  
    19.             //if the health is < 0, mean die callback will take care of respawn
    20.             if(damager.forceRespawn && damageable.CurrentHealth > 0)
    21.             {
    22.                 StartCoroutine(DieRespawnCoroutine(false, true));
    23.             }
    24.         }
    Is this correct? Can you double check please? :)

    I am focusing on the "damageable.CurrentHealth > 0", its twice the same if? Should it be that way?

    Thanks for great kit btw ;)
     
  47. Veneth

    Veneth

    Joined:
    Feb 19, 2013
    Posts:
    1
    According to the changelog:
    fixing this part of code by putting PrefabUtility.GetPrefabParent(target) instead of PrefabUtility.GetCorrespondingObjectFromSource(target) does the trick.
     
  48. DoctorMikeReddy

    DoctorMikeReddy

    Joined:
    Sep 15, 2017
    Posts:
    4
    Playing this with a controller is fun, except...
    ...the start and menu screens don't seem to recognise controller input. This is also true of the 3D Game Kit but that also has non-inverted X and Y on the right joystick, with no options to switch in the menus :-(
    How to fix the menu screens, so they can react to controller input?
    P.S. Am asking here as it is 'meant' to be a "no coding" kit. I will try to fix this myself, but thought it best to ask here, in case this needed to be added officially.
     
  49. thenewkgb82

    thenewkgb82

    Joined:
    Nov 10, 2018
    Posts:
    49
    Problem with TilesetGameKit and TilesetRockWaterBlockers.

    How do you set the paint brush to paint correctly placed tiles (grass and mud) from the one tile? I've painted one of the tiles from the nine in TilesetRockWaterBlockers into TilesetGameKit by mistake, and now it doesn't paint both grass and mud. Not sure how to set up mud and grass again from my selected type (alien or grass) in TilesetGameKit.
    I'll let you know if I find out.
     
  50. thenewkgb82

    thenewkgb82

    Joined:
    Nov 10, 2018
    Posts:
    49
    OK I found TilesetRockRules, but it only places a verticle rock column when I paint.