Forum begins after the advertisement:

 


[Part 5] Scene Transition Errors

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 5] Scene Transition Errors

Viewing 20 posts - 41 through 60 (of 64 total)
  • Author
    Posts
  • #19199
    #19200
    Ser Apustaja
    Level 6
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    It’s perfectly fine to upload your project folder as a regular folder on GitHub. This allows others to access the files directly without needing to unzip anything. Just make sure that your .gitignore file is set up correctly to exclude any unnecessary files (like temporary files or build artifacts).

    If you have any specific questions about the GitHub repository or if there’s something in particular you’d like feedback on, feel free to ask! Is there a specific part of the project you want help with?

    #19201
    Terence
    Level 31
    Keymaster
    Helpful?
    Up
    0
    ::
    I don’t know if I did it correctly. But here is the link for the GitHub page. Thank you!
    No problem, but I think you forgot to paste in the link. Nevermind, just saw the link. Sent you an email to request access.
    #19202
    Nirvik Rajbhandari
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    I added access to both of you. PillowMaster i s the correct username right?

    #19203
    Josiah Loh
    Level 4
    Moderator
    Helpful?
    Up
    0
    ::

    Yes, I have received the invite to the Github repository. Thanks Nirvik!

    #19204
    Ser Apustaja
    Level 6
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    It looks like you’re coordinating access with your collaborators! However, I don’t have specific usernames or accounts for any external platforms, including GitHub or others. I can provide guidance based on the context you share here, but I can’t access external links or confirm usernames.

    If you’re unsure about the access permissions or how to share your project, make sure that the collaborators have the right permissions to view or edit your repository. If you have any questions about GitHub or how to structure your project, feel free to ask, and I’ll be happy to help!

    #19210
    Josiah Loh
    Level 4
    Moderator
    Helpful?
    Up
    0
    ::

    Hi @nirvikrajbhandari. Following up after testing out the project for myself, I couldn’t find any issue regarding the scene transitions. I have attached a screen recording of the scene transition test below, and do let me know if I’m missing something.

    View post on imgur.com
    #19213
    Nirvik Rajbhandari
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    I don’t know if i did it right but the player is not going through the cutscene where it walks into the scene? There is also a nullreferenceexception but i dont know if that matters or not.

    #19214
    Ser Apustaja
    Level 6
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    To troubleshoot the issue with the player not going through the cutscene when entering the scene, and considering the NullReferenceException, please check the following:

    1. Cutscene Logic: Ensure that the WalkIntoNewScene() coroutine is being called correctly when the player enters the scene transition. Verify that the cutscene boolean in the PlayerStateList is set to true before starting the coroutine.

    2. NullReferenceException: Identify which variable is causing the NullReferenceException. This could be related to the player state or any other component that is expected to be initialized. Use debug logs to check the state of your variables before the error occurs.

    3. Scene Transition Setup: Double-check that the SceneTransition script is correctly set up in the scene and that all serialized fields (like transitionTo, startPoint, etc.) are assigned in the Unity Inspector.

    4. Coroutine Execution: Make sure that the coroutine is not being interrupted or skipped due to any conditions. You may want to add debug logs at the start of the WalkIntoNewScene() coroutine to confirm it is being executed.

    5. Player Object State: Ensure that the player object is not being destroyed or reset during the transition, which could lead to a null reference when trying to access its components.

    Could you provide more details about where the NullReferenceException is occurring and any specific logs or behaviors you observe when the player attempts to enter the scene? This will help narrow down the issue further!

    #19220
    Josiah Loh
    Level 4
    Moderator
    Helpful?
    Up
    0
    ::

    Thanks for the update, I’ll look into why the cutscene is not playing and the NullReferenceException errors.

    #19226
    Nirvik Rajbhandari
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    I don’t mean to sound impatient but is there anything else I can provide or do to help?

    #19227
    Ser Apustaja
    Level 6
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    To help you effectively, could you please provide more details about the specific NullReferenceException you’re encountering? Additionally, it would be helpful to know which part of the code is responsible for the cutscene where the player walks into the scene. Are there any specific lines or components that seem to be causing the issue? This information will assist in diagnosing the problem more accurately!

    #19228
    Josiah Loh
    Level 4
    Moderator
    Helpful?
    Up
    0
    ::

    Could you provide an example on how the intended behaviour of the scene transition is supposed to look like?

    #19229
    #19230
    Ser Apustaja
    Level 6
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    Thanks for sharing the timestamp from the tutorial! It sounds like you’re trying to implement a scene transition with a cutscene effect, and you may also be encountering NullReferenceException errors during this process.

    Steps to Troubleshoot and Fix the Scene Transition:

    1. Review the Tutorial: Make sure you closely follow the steps in the tutorial, especially around the section from 34:14 to 34:19. Pay attention to how they set up the scene transition and any specific methods they call to start the cutscene.

    2. Check Coroutine Logic: If the cutscene is supposed to trigger a coroutine, ensure that your coroutine is being started correctly. For instance:

      StartCoroutine(Walk_Into_New_Scene());
    3. Debugging Null References: If you’re still getting NullReferenceException, try to identify which specific variable is null. Add debug logs before the lines where the error occurs, as previously mentioned:

      Debug.Log("Checking variable: " + variableName);
    4. Make Sure Required Components Are Attached: If your player character or the cutscene manager relies on any specific components (like a Rigidbody or Animator), make sure they are all attached to the GameObject in your scene.

    5. Scene Changes and Object Lifecycles: If you’re changing scenes, ensure that the player object is properly set up in the new scene. If not using DontDestroyOnLoad, ensure the player is instantiated correctly when entering a new scene.

    6. Cutscene Timing: If the cutscene is not playing at all, check that the timing and conditions for starting the cutscene are being met. Make sure the method that starts the cutscene isn’t being blocked or skipped due to any conditional statements.

    7. Review Scene Transition Code: Look at the code responsible for the transition itself. If it’s supposed to trigger the cutscene, ensure that it’s being called correctly after the scene changes.

    8. Test in Isolation: If possible, create a simple test scene where you implement just the scene transition logic without other game elements to isolate the issue. This way, you can confirm whether the transition and cutscene logic works on its own.

    If you can provide the specific error message you are encountering or share relevant code snippets, that would help narrow down the issue further. Let me know how it goes!

    #19231
    Josiah Loh
    Level 4
    Moderator
    Helpful?
    Up
    0
    ::

    Ah ok, so the cutscene is the walking in animation sequence?

    #19232
    Nirvik Rajbhandari
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    yes something like that. Idk if im just misinterpreting what the video is saying though

    #19233
    Ser Apustaja
    Level 6
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    It’s completely understandable to feel a bit lost when trying to interpret tutorials, especially when implementing complex features like scene transitions and cutscenes. Here are some tips to help clarify your understanding and ensure you’re on the right path:

    1. Pause and Rewind: Don’t hesitate to pause the video and rewind sections that are unclear. Sometimes, watching a particular part multiple times can help you catch details you might have missed.

    2. Take Notes: Jot down key steps or code snippets while watching. This can help solidify your understanding and give you a reference to go back to when implementing your code.

    3. Break It Down: Try to break down the scene transition and cutscene implementation into smaller, manageable parts. Implement one small feature at a time and test it before moving on to the next part.

    4. Ask Specific Questions: If there’s a particular part of the video or a concept that doesn’t make sense, feel free to ask specific questions about it. This can help clarify your doubts and provide you with more targeted guidance.

    5. Experiment with Code: If you have a specific piece of code that you’re unsure about, try modifying it or adding debug statements to see how it behaves. Sometimes hands-on experimentation can lead to valuable insights.

    6. Check for Common Issues: If you encounter errors like NullReferenceException, double-check that all objects and components are properly initialized and assigned. This is a common source of confusion and can often be resolved with a few simple checks.

    7. Collaborate with Others: If you’re working with others on the project, don’t hesitate to discuss your understanding with them. They may have insights or interpretations that can help clarify the tutorial’s content.

    If you’re still feeling unsure after trying these methods, feel free to share any specific parts of the tutorial, your implementation, or any errors you’re encountering. I’m here to help you work through it!

    #19234
    Josiah Loh
    Level 4
    Moderator
    Helpful?
    Up
    0
    ::

    No worries Nirvik, that helps. Thanks for providing the link to the video too.

    #19246
    Nirvik Rajbhandari
    Level 5
    Participant
    Helpful?
    Up
    0
    ::

    I fixed the main problem. Now the only thing is that the player will slide instead of walk.

Viewing 20 posts - 41 through 60 (of 64 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: