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

Official Endless Runner Sample Game Q&A

Discussion in 'Community Learning & Teaching' started by Aurore, Aug 15, 2017.

  1. D_Drakon

    D_Drakon

    Joined:
    May 21, 2017
    Posts:
    2
    Good Morning
    My name is David, me and my friend Alan are game developers. I'm following your tutorial to create a game similar to trash cat but in the case we are doing a spaceship, I wanted that instead of jumping and sliding I would control the height of the ship, it would have a greater freedom of movement, but I can not find the correct place that I would modify in the script to make that move , can you help me ?

    I want to be able to reach the same freedom of movement of this video
     
  2. gersonsdj

    gersonsdj

    Joined:
    Oct 31, 2017
    Posts:
    3
    Hi guys, I'm facing some issues when testing the Trash Dash.
    1. Ads are not being shown, I configured everything, toggle the test mode, tested many times but without success. I already have another game on play store and it is working well.
    2. The cat only starts to collect the fishes after 100m, before this, nothing is collected.
    3. The first obstacle sometimes collides with the cat even when it is not in same line. :(
    4. I need to improve my English. :)

    Please anyone help me on this since I didn't find any configuration apart from the instructions on the package.

    Thanks in advance
     
    Last edited: Aug 23, 2018
  3. adeel1214

    adeel1214

    Joined:
    Jun 22, 2018
    Posts:
    7


    try use the older version of unity editor
     
    gersonsdj likes this.
  4. gersonsdj

    gersonsdj

    Joined:
    Oct 31, 2017
    Posts:
    3
    Hi!
    I tried, I'm currently using 2018.1.8f1. By the way, in Editor also i have this issue.

    Can anyone help please???
     
  5. unity_2Nqv9d7rSPl3EA

    unity_2Nqv9d7rSPl3EA

    Joined:
    Jun 14, 2018
    Posts:
    2
    I have a issue i builded the apk and install on a phone to test but whenever i click on start the file only shows loading forever here is the screenshot 2018_09_07_11_57_03.jpg
     
  6. adeel1214

    adeel1214

    Joined:
    Jun 22, 2018
    Posts:
    7
    ok you will first build the assest bundle and put it in stremingassest so the problem is fixed
     
  7. Niyazmohammad

    Niyazmohammad

    Joined:
    Jul 23, 2016
    Posts:
    14
    how to build the asset bundle and then put it in streamingasset.
     
  8. thebaddie

    thebaddie

    Joined:
    Feb 27, 2016
    Posts:
    7
    I'm wondering if it's possible to create themes that are not random and have an end point, a sort of level system in wich tracks are not ramdomly picked from zones but follow their index order and obstacles and coins are placed in a predetermined position.

    I think it's not that difficult to add an endLevel state or to change the code for the track picking but i'm not sure about prefixed positions for obstacles and coins.
     
  9. abalta

    abalta

    Joined:
    Mar 17, 2013
    Posts:
    3
    1-) How to change default modifier to SingleLifeRun modifier?

    2-) Why did you create the shop scene separate?

    3-) I don't get where are the add entry and exit point of path? In asset, it has only path object in segment.
     
    Last edited: Oct 8, 2018
  10. abalta

    abalta

    Joined:
    Mar 17, 2013
    Posts:
    3
    Hi, this is good looking of runner type game, but I can't found on Play Store.
     
  11. mjain787

    mjain787

    Joined:
    Nov 2, 2018
    Posts:
    1
    hi there, i am a bit confused about the pooling thing you did for the collectibles and path can you give a brief about how you did it. thanks
     
  12. -lt

    -lt

    Joined:
    Sep 27, 2015
    Posts:
    3
    I ran into something similar - I had my new custom character built, animated and prefabbed, but couldn't get it to show up in the game. In the INSTRUCTIONS.txt it mentions setting the label for Addressable Assets.

    The key to Addressable Assets (VERY HANDY) is you have to set the label.

    To set this, You must click menu: Window > Asset Management > Addressable Assets.

    This will open a dialog box in Unity with your new character (or scene) listed per the bundle name you assigned in (my example was character/TestCharacter.

    Set the LABEL (click, drop down) and put a check next to Character (Or Theme Data depending upon what you're adding) and then it should show up in the app's Store screen under Characters (or themes, depending upon whether you're adding a theme or character.

    Here's a link to a great Google doc I found on the topic: https://docs.google.com/document/d/...lR56e_zCro41KHfyM/edit#heading=h.a1skj2e7aute

    Page 3 of that Google doc has screen shots and images under the "Screenshots of Addressable Assets in the Editor" section.

    Enjoy and hope that helps.
     
    Niyazmohammad likes this.
  13. KevThompson

    KevThompson

    Joined:
    Dec 11, 2018
    Posts:
    2
    Hi,

    Thanks for the demo code, Im really knew to the Unity engine and this is exactly what I've been looking for as a test bed for a game I want to make. Im currently poking at the code base to try to get to grips with what its doing.

    My Question is, how do I change the curve of the world? I've changed the curveStrength value in WorldCurver.cs to a number of different values but it never makes a difference, I've tried a wide range of values in there including 0.0f; and nothing seems to make a difference.

    Are there some build steps im missing to publish the shader changes to the app or have a totally grasped the wrong end of the stick.
     
  14. TonkaThompson

    TonkaThompson

    Joined:
    Jul 28, 2017
    Posts:
    1
    Last post was me but I can’t seem to edit it.

    The value was being over ridden via the editor interface. I missed it when I was looking.
     
  15. KevThompson

    KevThompson

    Joined:
    Dec 11, 2018
    Posts:
    2
    Not sure if this is the right place for this question, I've exported the materials and shaders from Trash Dash and im trying to import them into my project so I can use the curvedWorld functionality.

    CurvedRotation is working fine but CurvedUnlit is showing an as Pink with the error being printed out.

    "------- GLSL link error: ERROR: Input of fragment shader 'vs_TEXCOORD2' not written by vertex shader"

    Anyone got any ideas? I've set my project up to be using the light weight pipeline and tried to re import a couple of times but no luck.

    Note: Not sure why My PC has this strange username but laptop is my proper TonkaThompson name.
     
    Last edited: Dec 17, 2018
  16. icematess

    icematess

    Joined:
    Nov 29, 2018
    Posts:
    3
  17. unity_2Nqv9d7rSPl3EA

    unity_2Nqv9d7rSPl3EA

    Joined:
    Jun 14, 2018
    Posts:
    2
    Sir can you help I builded it two times I just changed the logo of tran dash but when I run it on android device it always shows loading never run button comes in main scene I tried on multiple device can you help me please
     
  18. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    wont work? any? wont generate assest bundle
     
  19. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    Hi I was trying to check in this asset and everything was looks great.. but I'm just wondering how the playerdata work? I tried to find it in the heirarchy but I cant find it see how mission was setup and adding characters
     
  20. DucaDiMonteSberna

    DucaDiMonteSberna

    Joined:
    Jan 18, 2018
    Posts:
    50
    updating to the adressable system give me this error and an empty game.

    ArgumentException: The Object you want to instantiate is null.
    UnityEngine.Object.CheckNullArgument (System.Object arg, System.String message) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:374)
    UnityEngine.Object.Instantiate (UnityEngine.Object original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:197)
    UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnityEngineObject.bindings.cs:276)
    TrackManager.Begin () (at Assets/Scripts/Tracks/TrackManager.cs:166)
    GameState.StartGame () (at Assets/Scripts/GameManager/GameState.cs:114)
    GameState.Enter (AState from) (at Assets/Scripts/GameManager/GameState.cs:89)
    GameManager.SwitchState (System.String newState) (at Assets/Scripts/GameManager/GameManager.cs:81)
    LoadoutState.StartGame () (at Assets/Scripts/GameManager/LoadoutState.cs:377)
    UnityEngine.Events.InvokableCall.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:166)
    UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_0.cs:58)
    UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:66)
    UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:108)
    UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:50)
    UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
    UnityEngine.EventSystems.EventSystem:Update()
     
  21. ShoaibUsmani

    ShoaibUsmani

    Joined:
    Nov 24, 2017
    Posts:
    1
    hey greetings ...
    i added a humanoid character which is moving fine but Animation is not working properly ...can you help me to fix this issue
     
  22. AndyTruman

    AndyTruman

    Joined:
    Aug 19, 2019
    Posts:
    13
    Thank you for sharing :)
     
  23. DucaDiMonteSberna

    DucaDiMonteSberna

    Joined:
    Jan 18, 2018
    Posts:
    50
    I have a problem, for some strange reason this function , written in character script, manages to hide the accessories just if they are direct childrens of the character gameobject, and I cannot understand why. Shouldn't the line
    " accessories.gameObject.SetActive(i == PlayerData.instance.usedAccessory);"
    be able to set the gameobjects wherever they are?

    public void SetupAccesory(int accessory)
    {
    for (int i = 0; i < accessories.Length; ++i)
    {
    accessories.gameObject.SetActive(i == PlayerData.instance.usedAccessory);
    Debug.Log(accessories.gameObject.name);


    if (i == PlayerData.instance.usedAccessory)
    {
    Debug.Log("enabling accessory " + i);
    }
    else
    {
    Debug.Log("disabling accessory " + i);
    }
    }
    }

    thanks in advance for the answer

    EDIT: nevermind, is theanimator that somehow does not let the scrupt to change the state of the accessories, because i have some animations that disables/enables them. but strangely enoth, these animations are not the one played when this strange behaviour happens


    EDIT II: nevermind again, solved by setting all accessories in an holder gameobject and animating it instead, so the scripts is free to interact with the accessories.
    source is here:
    https://answers.unity.com/questions/1108797/does-animator-animation-overridesdisables-script-c.html

    I didn't know that animator overrides all parameters present in all of its animations, not just the one being currently played. Good to know.


    Even if I solved the problem I leave the post here for future reference.
     
    Last edited: May 26, 2020
  24. MC56

    MC56

    Joined:
    Jun 8, 2020
    Posts:
    5

    Hi David, I just came across your thread. Where can I find that tutorial you are talking about? The one to make an endless runner game like Trash Dash?

    Thanks
     
  25. Asad-Mehar

    Asad-Mehar

    Joined:
    Aug 17, 2015
    Posts:
    4
    Hi, Latest version is not working with il2cpp backend, worked fine on the mono backend. The android build with il2cpp gets crash on the start button.
    Does anyone know how to fix that issue?
     
  26. mediaticsvc64

    mediaticsvc64

    Joined:
    Nov 7, 2015
    Posts:
    28
    Hi, i tried to change from Windows to Android after having made lots of customisation and now the trash cat character run for the tutorial and then everything stop moving . No error message. Why?
    I was on unity 19.3.15f1 and I updated project to 2019.4.3f1 after that bug but still the same issue.
     
  27. joelosiris91

    joelosiris91

    Joined:
    May 2, 2016
    Posts:
    4
    Sorry but, I don't have that script on my folder :(
     
  28. joelosiris91

    joelosiris91

    Joined:
    May 2, 2016
    Posts:
    4
    I can't find this script, will it have been removed in a later update?
     
  29. enchiridion

    enchiridion

    Joined:
    Oct 29, 2014
    Posts:
    57
    I had the AssetBundlesDatabaseHandles script in 2020 but then when I switched to 2019 and started clean it disappeared, what gives?
     
  30. RapongaGames

    RapongaGames

    Joined:
    Nov 24, 2018
    Posts:
    1
    Why does the player move in Update and not FixedUpdate?
     
  31. venilalwaysrocks

    venilalwaysrocks

    Joined:
    Dec 2, 2020
    Posts:
    1
    when i open game in android the loading screen visible permanent please help
     
  32. shahanpower

    shahanpower

    Joined:
    Sep 10, 2018
    Posts:
    3
    I am trying to make windows build for the Trash dash project, everything is working on the editor but assets dont load in build. I get to the player selection screen but the characters or other objects dont load there.
     
  33. crawfis

    crawfis

    Joined:
    Jan 30, 2014
    Posts:
    103
    You need to copy of the Addressables or AssetBundles. Sometimes this seems to work automatically, but most of the time it doesn't.
     
  34. crawfis

    crawfis

    Joined:
    Jan 30, 2014
    Posts:
    103
    I am using 2020.2.5f1 and Addressables 1.16.16 and I am getting all of my AsyncOperationHandle's in TrackManager->SpawnFromAssetReference to be "InvalidHandle" after the first track segment or two have been loaded. Very likely I did something wrong, but I do not think I have touched this part of the code.
     
  35. crawfis

    crawfis

    Joined:
    Jan 30, 2014
    Posts:
    103
    I was able to fix this by replacing the following line with the uncommented one. So I think it is a bug or incompatible change in Addressables.
    Code (CSharp):
    1.         //AsyncOperationHandle op = reference.LoadAssetAsync<GameObject>();
    2.         AsyncOperationHandle op = Addressables.LoadAssetAsync<GameObject>(reference);
    3.  
     
    Ranasherry likes this.
  36. CionteL

    CionteL

    Joined:
    Oct 2, 2020
    Posts:
    1
    Hello. I came across an issue with spawning coins (fish skeletons): they can spawn inside obstacles (1st, 2nd screenshots). It seems that lines 597-606 in the TrackManager script (3rd screenshot) are about to avoid that, but it doesn't work...
    I checked that the obstacles surely have 9 layer mask. And I tried to increase the radius of the sphere in line 597, but that doesn't help.
    I wonder why does it happen and how to fix it? Can someone help, please?

    why1.png

    why2.png

    why3.png
     
    latrodektus likes this.
  37. ajiewonder

    ajiewonder

    Joined:
    Mar 20, 2021
    Posts:
    1
    Hello,

    Thank you for this sample project. It helps me a lot to build my first game.

    I have a question, how can we add new missions?


    Thanks in advance.
     
  38. canarip

    canarip

    Joined:
    Jul 22, 2020
    Posts:
    4
    Hello,
    Thanks for this project.
    I don't change anything in this project and when I want to build it, first I use the menu entry Assets > AssetBundles > Build AssetBundles but this didn't build the bundle in the AssetBundles folder, I'm in unity 2019.2.10f1
    any help please to fix this
     
  39. unity_AKipofx9SUEewg

    unity_AKipofx9SUEewg

    Joined:
    Aug 31, 2021
    Posts:
    3
    How did you get it to work, and what version are you using because im missing teh script thats mentioned
     
  40. unity_AKipofx9SUEewg

    unity_AKipofx9SUEewg

    Joined:
    Aug 31, 2021
    Posts:
    3

    where did you find this
     
  41. crawfis

    crawfis

    Joined:
    Jan 30, 2014
    Posts:
    103
  42. unity_AKipofx9SUEewg

    unity_AKipofx9SUEewg

    Joined:
    Aug 31, 2021
    Posts:
    3
  43. Candy_World

    Candy_World

    Joined:
    Oct 19, 2018
    Posts:
    1
    Hi, Anyone can help me to run this game on android ? I am stuck on loading screen in this game and I need urgent help. I am unable to understand how to handle asset bundle issue on unity 2019.4.6
     
  44. Gamer_Extremo_Elite_Hacker_BR

    Gamer_Extremo_Elite_Hacker_BR

    Joined:
    Nov 8, 2021
    Posts:
    3
    Trash Dash
    Problemas ao compilar.
    Telas de inicio da corrida não abre
     
  45. Gamer_Extremo_Elite_Hacker_BR

    Gamer_Extremo_Elite_Hacker_BR

    Joined:
    Nov 8, 2021
    Posts:
    3
    Trash Dash
    Problemas ao compilar.
    Telas de inicio da corrida não abre.
    No unity o jogo executa normal tudo certo mas ao compilar e executar no celular a tela fica bagunçada, e presa no inicio do tutorial. Mudei as resoluções dos canvas, mas não adiantou. alguém pode ajudar.
     
  46. Gamer_Extremo_Elite_Hacker_BR

    Gamer_Extremo_Elite_Hacker_BR

    Joined:
    Nov 8, 2021
    Posts:
    3
    Trash Dash
    Problemas ao compilar.
    Telas de inicio da corrida não abre.
    No unity o jogo executa normal tudo certo mas ao compilar e executar no celular a tela fica bagunçada, e presa no inicio do tutorial. Mudei as resoluções dos canvas, mas não adiantou. alguém pode ajudar.
     
  47. canarip

    canarip

    Joined:
    Jul 22, 2020
    Posts:
    4
    Thanks for this project, I have a simple question, how can I modify the number of life from 3 to another number
     
  48. canarip

    canarip

    Joined:
    Jul 22, 2020
    Posts:
    4
    Thanks for this project, I have a simple question, how can I modify the number of life from 3 to another number ?
     
  49. latrodektus

    latrodektus

    Joined:
    Nov 1, 2016
    Posts:
    13
    Did anyone find a solution to this?
     
  50. Masklancer

    Masklancer

    Joined:
    Jul 12, 2022
    Posts:
    1
    Hey guys, I'm trying to add a new type of coin, a bone as I'm planning on adding a playable dog character, so my issue is the bone is spawned but a portion of it is underground as seen in the screenshot, I have used the curvedRotation shader to rotate the bone as well. So kindly tell me where I can make the changes to spawn the bone properly.
     

    Attached Files:

    Last edited: Sep 3, 2022