Search Unity

Ruby's Adventure: 2D Beginner project HELP

Discussion in '2D' started by jayne88, Mar 8, 2019.

  1. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8
    I am currently working through this tutorial and really enjoying it. I have reached a problem and can't for the life of me figure out what is wrong. I have just worked through lesson 9: sprite animation and when I click play to test, the character sprite disappears! I have gone through the code so many times and through the tutorial multiple times too to no avail. Has anyone done this and had a similar issue?
    Thanks in advance!
     
  2. Geejayz

    Geejayz

    Joined:
    Feb 8, 2016
    Posts:
    73
    Hi,
    Did you get any errors or warnings in the console when you click play?
     
  3. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8
    Hi there,

    No, nothing at all. Its bizarre! I'm wondering if there is an issue with the animated character, but that is what was provided.

    Thanks
     
  4. Geejayz

    Geejayz

    Joined:
    Feb 8, 2016
    Posts:
    73
    It may be worth trying the following:
    1. First, make sure you have a prefab of the character (ruby)
    2. Remove the character from the (scene) hierarchy (i.e not the prefabs folder).
    3. In the prefab, remove the Animator component.
    4. Click Add component and add new Animator
    5. Drag the provided ruby animation controller on to the new Animator slot in the inspector.
    6. Ensure you save any changes to the prefab at this point.
    7. Finally, drag the prefab back into the scene.
     
    jayne88 likes this.
  5. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8
    Thanks, I'll give that a try :)
     
  6. CharlieHolden

    CharlieHolden

    Joined:
    Dec 18, 2018
    Posts:
    1
    That tutorial is a disaster. I just did the animations one and I noticed that in the Ruby controller code to animate Ruby, it says to use
    Code (CSharp):
    1. animator.SetFloat("Move X", 0);
    2. animator.SetFloat("Move Y", direction);
    but in the animator it uses Look X and Look Y so should be:
    Code (CSharp):
    1. animator.SetFloat("Look X", 0);
    2. animator.SetFloat("Look Y", direction);
    Also, it leaves out adding this in void start() for that section as well.
    Code (CSharp):
    1.  animator = GetComponent<Animator>();
     
    apollo634 and Geejayz like this.
  7. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8

    Thanks, tried this and it's still not working. The only thing I think I could try now is to do all of the animations myself from scratch. It's a bit annoying really but at least I can learn from it. Thanks again for your help :)
     
  8. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8
    Heya, thanks for your suggestion. I noticed this too and changed it with the hope that it would solve the issue but it didn't. Still unsure what the issue is, but I am going to re-animate Ruby myself and go from there. Fingers crossed!
     
  9. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8
    I am feeling pretty frustrated with this tutorial as I am trying to redo the sprite animation which is super difficult for a beginner, especially as the sprites aren't labelled and separated in the sprite editor. Feel like I'm not going to get this finished and I have spent a lot of time on it, aside from asking the Unity community for help, what else could I do? Is there a way of contacting the creator of this tutorial?
     
  10. Geejayz

    Geejayz

    Joined:
    Feb 8, 2016
    Posts:
    73
    As a last resort... you could go to the Asset Store and download the completed project. It is named similar to the assets you downloaded for the tutorial I believe.
    Once you have this, you could copy over the completed scripts or use them to compare with what you have done so far. You could also copy over the ruby prefab.
    It could all get a bit messy though but it is unfortunate when you invested so much time in this.
     
  11. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8
    Thanks so much, I'll give this a try :) If it doesn't work I'll scrap it.
     
  12. jayne88

    jayne88

    Joined:
    Sep 9, 2017
    Posts:
    8
    Thanks again, it was fiddly but it's working now! Phew!
     
    Geejayz likes this.
  13. X-Pascalou

    X-Pascalou

    Joined:
    Apr 19, 2019
    Posts:
    9
    Hello everyone,

    I have the same issue but way earlier in the Tutorial.
    I am doing Character Controller & KeyBoard Input.
    Step 7 is the moment when you can move Ruby.

    The thing is that as soon as I press play, the Character disapear from the Game.
    I can see in the editor that the object still exist and I can move its coordinates.
    Do you know if it is normal at this stage?
    Am I supposed to see Ruby in the Game or is it a step for later.

    Thank you for your time.

    Pascal
     
  14. jelectrical2006

    jelectrical2006

    Joined:
    Sep 26, 2019
    Posts:
    1
    I am just doing the tutorial myself, I am wondering if I (ruby) should be able to exert force on the bot?
    I can push it around.
    I have also had to remove the if broken statement in the enemy controller script as if I leave it there the bot walks in the same place and does not turn, any Ideas?
    I ended up copy and pasting their entire code so its not me(scripting anyway).
    cheers in advance.
     
  15. ErisCinder

    ErisCinder

    Joined:
    Jun 8, 2019
    Posts:
    3
    The issue I am encountering is that at the end of the Sprite Animation chapter Ruby jitters when I press play. I copied and pasted the code to make sure I didn't miss anything but I get the same thing. Ruby walks in all directions but in Idle state she jitters and sometimes the walking animation does not look right and she just slides.
     
  16. stinkyskunkedmo

    stinkyskunkedmo

    Joined:
    May 8, 2013
    Posts:
    1
    For other people looking for this answer, because the Ruby script uses Vector 2, for some reason she skips to 0 on the z axis, meaning she is on the same line as the camera. Go into the camera position and move it back a bit on the z axis. Or you can change the Vector2 to Vector3 and the sprite doesn't pop forward.
     
  17. lucasxavier22

    lucasxavier22

    Joined:
    Nov 27, 2020
    Posts:
    3
    I need some help. I'm at the "Visual Styling - Particles" part and I have a problem with the smoke not showing on game Tab.
    I did everything corret and it seems to be working correctly, but when I hit play, I can't see the smoke on the "Game" tab, it just does not show. The particles show up fine in the "Scene" tab while in play mode.

    Does anyone know what is happening and how to solve this?
    I'm using Unity 2020.1.17f1
     
  18. Valjuin

    Valjuin

    Joined:
    May 22, 2019
    Posts:
    481
    See this post in the Ruby’s Adventure: 2d Beginner Official Thread
     
    Last edited: Feb 27, 2021