Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Need help with the Lego microgame tutorial bug

Discussion in 'Editor & General Support' started by JohnJohn332211, May 21, 2021.

  1. JohnJohn332211

    JohnJohn332211

    Joined:
    May 21, 2021
    Posts:
    5
    In the Lego microgame, in part "Customize your game" step 6/11

    There is no plus in the "specific actions" menu (I have linked a picture)

    Is there some way to get the plus to show?

    Is there some other way to "add an action" ?

    https://imgshare.io/image/whereistheplus.p8bb6t
     

    Attached Files:

  2. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    Under Specific Actions, set the Size property to 1.
     
    JohnJohn332211 likes this.
  3. JohnJohn332211

    JohnJohn332211

    Joined:
    May 21, 2021
    Posts:
    5
    Thank you, that made it work.

    Do you know how to have the + sign added there?
     
  4. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    Set the Size property to the number of Actions that you wish to add.

    See screenshot from one of the LEGO® Mod tutorials:

    upload_2021-5-21_23-18-34.png
     
  5. JohnJohn332211

    JohnJohn332211

    Joined:
    May 21, 2021
    Posts:
    5

    Yes changing it from 0 to 1 works.

    However my reply question was if you know how to get the ----> + <------ there. How to get the plus there.
     
  6. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,050
    edit: sorry replied in wrong thread :D

    edit again. check if the tutorial uses the new input system and if you are using the old input system.

    that "actions" may be something related to the new input system

    lol edit again: :D is the tutorial for mobile (android and ios) and your project is for windows?
     
    Last edited: May 22, 2021
  7. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    I know what you asked, but the way to add Actions has obviously changed since the In-Editor tutorials were made, hence the reason I posted the screenshot.
     
  8. JohnJohn332211

    JohnJohn332211

    Joined:
    May 21, 2021
    Posts:
    5

    I think the tutorial is for windows, and it dosent really matter, the answer was changing the 0 to 1 and that made it work
     
  9. JohnJohn332211

    JohnJohn332211

    Joined:
    May 21, 2021
    Posts:
    5

    About the +, perhaps it has been removed. :)
     
    Valjuin likes this.
  10. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,050
    what unity version you have? some details have changed when adding items to a list in the editor in newer versions
     
  11. fabioduque

    fabioduque

    Joined:
    Dec 2, 2021
    Posts:
    2
    I am new to Unity and I've started with the lego tutorial with editor version 2020.3.24f1, which does not show anything under "Specific Actions" (no dropdown arrow, no Size field).
    It makes it impossible to continue with the tutorial and seems to be a bug which no one talks about (I only find posts which refer to changing Size to 1, but there is no field to change).

    I've tried with a previous editor version (2019.4.33f1) and the dropdown and size field exist, so I guess I'll have to stick with an older version for now.

    upload_2021-12-4_17-47-34.png

    upload_2021-12-4_17-47-40.png
     
  12. unity_R2eJBGFH9kUZEQ

    unity_R2eJBGFH9kUZEQ

    Joined:
    Dec 4, 2021
    Posts:
    1
    I am having the same issue, with the exact same screenshot =|
     

    Attached Files:

  13. TimeBanditJK

    TimeBanditJK

    Joined:
    Dec 4, 2021
    Posts:
    1
    debug mode.png

    I thought perhaps I could get around it by activating 'debug' mode found under the three dots in the upper right. That did let me change the number of actions, but still doesn't let you pick the Explode brick in the action.
     
    Fizmez and a033150 like this.
  14. buyuk

    buyuk

    Joined:
    Dec 4, 2021
    Posts:
    2
    I have experienced this issue today, and discovered a workaround, so posting it here in case it will help someone:

    Code (CSharp):
    1.  
    2. // TriggerEditor.cs:72
    3.  
    4. // Change the following line:
    5. if (EditorGUILayout.PropertyField(m_SpecificTargetActionsProp, new GUIContent("Specific Actions"), false))
    6.  
    7. // to this:
    8. if (EditorGUILayout.PropertyField(m_SpecificTargetActionsProp, new GUIContent("Specific Actions"), true))
    9.  
    which should render the Size property and enable setting the trigger action correctly
     
    Last edited: Dec 5, 2021
  15. DrMeatball

    DrMeatball

    Joined:
    Nov 21, 2021
    Posts:
    93
    I'm stuck at this exact same point. TY for the code, but how do we implement it?
     
  16. buyuk

    buyuk

    Joined:
    Dec 4, 2021
    Posts:
    2
    All you have to do is to edit the file <ProjectDir>\Assets\LEGO\Scripts\Editor\TriggerEditor.cs like i described, and save it. Than just reload the project, and everything should work. I was able to go through the entire LEGO microgame tutorial after this change.
     
  17. fabioduque

    fabioduque

    Joined:
    Dec 2, 2021
    Posts:
    2
    @buyuk 's solution worked for me. Thanks!
     
  18. kacpi123xd

    kacpi123xd

    Joined:
    Dec 11, 2021
    Posts:
    2
    but i can't find this file.
     
  19. kacpi123xd

    kacpi123xd

    Joined:
    Dec 11, 2021
    Posts:
    2
    sorry i finded thx
     
  20. ScottBurtonGameDeveloper

    ScottBurtonGameDeveloper

    Joined:
    Dec 12, 2021
    Posts:
    1
    WOW, SAVED ME and my HOPES and DREAMS are now UNSHATTERED!!! TYTYTY!
     
  21. Sylint619

    Sylint619

    Joined:
    Dec 13, 2021
    Posts:
    2
    sorry, im new to this. where exactly do i go to make this change?
     
  22. FrancescoA

    FrancescoA

    Joined:
    May 20, 2015
    Posts:
    1
    It works!
    Thank you very much, buyuk!
     
  23. Sylint619

    Sylint619

    Joined:
    Dec 13, 2021
    Posts:
    2
    where did you find it?
     
  24. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I don't have the tutorial here, but it was stated previously that the file is located here:

    <ProjectDir>\Assets\LEGO\Scripts\Editor\TriggerEditor.cs

    Here is a screenshot of where you would find it, you should see a LEGO subfolder under Assets. I don't have it because I haven't installed the tutorial

    AssetsFolder.png
     
  25. Janus_de_Lange

    Janus_de_Lange

    Joined:
    Dec 17, 2021
    Posts:
    1
    I am having the same issue of specific action not having a dropDown to change size from 0 to1. I located 2 .cs file for the touchTrigger but can's seem to find a line as suggested by @buyuk to edit in either. The only one with a GUI is as you suggested in the editor file . This is where I added the line. I'm entirely new to coding though so yeah:oops:. There is a similar line but nothing to do with SpecificTargetActionsProp. Also there is a line that is already set to true but I doubt it has anything to do the Specific target action. The line is :
    1. [CustomEditor(typeof(TouchTrigger), true)]

    I tried adding the if statement provided by buyuk which then gave the 'specific' a dropDown. This however messed the whole tutorial up and although there was a dropDown now, I still couldn't complete that step of the tutorial. I deleted it now and I'm just lost.
    Is there perhaps another suggestion or guideline anybody can provide in order for me to resolve this issue?
    I was hesitant to just post the whole code so any suggestive direction to try and fix this would be appreciated.:D
     
    lokeman_yee and FranM727 like this.
  26. Magwar

    Magwar

    Joined:
    Nov 23, 2021
    Posts:
    1
    OMG thks so very much. and i feel like a boss by being able to it. first line of code ever. THKS a lot. :-D
     
  27. sumiv

    sumiv

    Joined:
    Oct 21, 2021
    Posts:
    2
    thank you @buyuk !! your solution helped loads
     
  28. t_b_

    t_b_

    Joined:
    Dec 26, 2021
    Posts:
    1
    thanks, i was able to get past the tutorial step with this. for reference i'm on version 2020.3.25f1
     
  29. jartukainen

    jartukainen

    Joined:
    Jan 6, 2022
    Posts:
    1
    Thank you so much for this, I didn´t get snapping first but after restarting the Unity after the save, it started to work. I'm using version 2020.3.25f1
     
  30. pumbac

    pumbac

    Joined:
    Jan 6, 2022
    Posts:
    1

    thanks a lot, and you saved me so much times!
     
  31. i_love_echo

    i_love_echo

    Joined:
    Jan 8, 2022
    Posts:
    1
    Thanks a lot! For anyone who does not know coding at all like me, you need to install Microsoft Visual Studios, and then use Visual Studios to open/edit the Triggertouch.cs file. It's pretty easy, just change the 'false' to 'true' from the above statement.
     
    zigmarasigan likes this.
  32. SlingshotAdam

    SlingshotAdam

    Joined:
    Jan 8, 2022
    Posts:
    1
    Thank you so much for this solution!!
     
  33. teamsilentpizza

    teamsilentpizza

    Joined:
    Jan 9, 2022
    Posts:
    1
    You can use Notepad++ if all you're doing is making a small change to a CS file, it works just as good if not better for simple changes because of how lightweight it is.
     
  34. wojblachow

    wojblachow

    Joined:
    Jan 4, 2022
    Posts:
    1
    It worked for me!
    Just change "false" to "true" in this line of code, save it, re-open the tutorial.
    Didn't work at first but I gave it another attempt and it solved the problem.
    I'm on macOS in case someone was wondering if this might be the issue.
     
  35. ImReeqs

    ImReeqs

    Joined:
    Jan 16, 2022
    Posts:
    1

    Man thank you so much! Have a nice day!
     
  36. Kaw_Zay7000

    Kaw_Zay7000

    Joined:
    Jan 17, 2022
    Posts:
    2
    When I made the change suggested above a field appeared to enter a number, but there was no "size" label, and the tutorial wouldn't let me proceed. Some have said that it didn't work at first, but I've tried several times, and still same result.
     
  37. Deleted User

    Deleted User

    Guest

    I was almost ready to give up completely - thank you so much!
     
  38. TCard1000

    TCard1000

    Joined:
    Jan 18, 2022
    Posts:
    1
    Buyuk...perfect answer. That fixed it. You're awesome. Thank you.
     
  39. COG_DOJ

    COG_DOJ

    Joined:
    Jan 20, 2022
    Posts:
    2
    Hello! I've tried to do as you suggested but there's no line in the Triggertouch.cs file to change the "false" in a "true"... I'm a bit lost . Here's what I have instead :
     

    Attached Files:

  40. COG_DOJ

    COG_DOJ

    Joined:
    Jan 20, 2022
    Posts:
    2
    Finaly it worked for me! if you were in my case, just click "back" until you have access to all files and then follow the instructions of buyuk!
     
  41. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    I believe it was mentioned to edit TriggerEditor.cs not Triggertouch.cs
     
  42. Ob1Ju4n

    Ob1Ju4n

    Joined:
    Jan 21, 2022
    Posts:
    2
    Hi all,
    After modifying the file mentioned by the @buyuk I was not able to find the size action as specified in the tutorial but I was able to move to the next step by selecting from the list the "Fence Explode" action. Hope it helps.
     

    Attached Files:

    ponder_s likes this.
  43. evgeny0191

    evgeny0191

    Joined:
    Jan 17, 2022
    Posts:
    1
    Omg dude you saved me! I was sure that this is some sort of an easter egg and tried to edit some script file, but a wrong one due to lack of exp with unity scripting and custom editor components. Thank you!
     
  44. ponder_s

    ponder_s

    Joined:
    Aug 25, 2021
    Posts:
    2
    Yes, that worked for me. I was able to click select action from the drop down menu and selected fence explode. I was able to proceed to the next steps, and when I play tested, the fence exploded like it should.
     
  45. venetsia36

    venetsia36

    Joined:
    Feb 6, 2022
    Posts:
    2

    This has worked! Thank you!
    Directory is indeed <ProjectDir>\Assets\LEGO\Scripts\Editor\TriggerEditor.cs
     
  46. miguelgargallo

    miguelgargallo

    Joined:
    Feb 9, 2022
    Posts:
    1
    Thanks