Somethings wrong with my 2D Space Ship game and I think it’s very simple.
// I'm at https://www.udemy.com/course/spaceshooter/learn/lecture/12975734#overview at 9:48.
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
Somethings wrong with my 2D Space Ship game and I think it’s very simple.
// I'm at https://www.udemy.com/course/spaceshooter/learn/lecture/12975734#overview at 9:48.
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
What error are you referring to, and what new code? The link you shared it not available to non-subscribers of UDemy. Should that be Instance and not instance? If you post the error message, we would not have to guess.
@Brian-Washechek hey Brian, you have started threads in the forums quite a few times over the years with similar stuff, posting about issues you’re having with paid video tutorials and other sites and books where you’re trying to learn things. As Jeff mentioned, you’re unlikely to find very many people who have access to the same stuff so we simply don’t have enough reference about what you’re doing and what your issues might be.
I’ve seen a lot of patient replies giving you advice to post the exact console errors, use code tags, and provide other relevant information so other forum users can try to help you. If you’re not going to take this advice for interacting with the forums more constructively, perhaps you could think about finding and reaching out to some Unity users in your area and getting some coaching or taking some classes or something. Doing this might help reinforce the basics, teach you a few tricks and tips, and should get you past the initial learning curve and leave you in a far better position to diagnose and fix the kind of issues you seem to keep on hitting.
At the very least, get a good C# reference and work through it to learn some of the language.
Sorry no, please don’t use pictures. Please take a moment to properly describe your issue, using words. Does the code run? Are you getting a compile error? Is the code not working as expected? Is intellisense in the editor not working (the squiggly lines)? Is this code you’re adding, separate from the tutorial? I’ve looked at your pictures. I’m not clear on the blaming mention, we are trying to understand your issue. Paste your full code, with code tags, and copy and paste the EXACT wording of any errors you might be seeing. I do see from your photo that you haven’t saved your file yet, be sure to save often. And make frequent backups (or use source control), in case you run into a roadblock and need to undo any recent changes that resulted in errors.
You’re duplicating your posts countless times despite the fact that we asked you just as many times over the past two years or so to not to.
You are posting screenshots instead of relevant code.
You aren’t responding when people is trying to help you like here or in this very thread.
You don’t really care what people say so why should we bother?
Ever the optimist, I will try one additional time, then I shall give up on you. It appears you are not even remotely listening or trying to help report your own problem, so I must conclude that you don’t really want it fixed, which is just weird.
According to his other posts, Brian was in a car accident a few years back that has resulted in some executive dysfunction for him.
I know that it can be frustrating to try to help debug a problem when you aren’t being given the tools to help, but please try to be compassionate when you’re dealing with strangers. Sometimes noncooperation is not the result of willing obstinacy or obtuseness.
public IEnumerator EndLevelCo() // This is starting a function labeled “EndLevelCo” that returns type “IEnumerator”
{
UIManager.instance.levelEndScreen.SetActive(true); // Setting my SetActive statement true
PlayerController.instance.stopMovement = true; // Setting my PlayerController statement true
levelEnding = true; // Setting my levelEnding statement true
MusicController.instance.PlayVictory(); // Telling my computer to play its victory song
yield return new WaitForSeconds(.5f); // Telling my computer to wait .5 of it’s seconds
// UIManager.instance.endLevelScore.text = "Level Score: " + levelScore;
// Here’s where my difficulty is.
// The computer doesn’t want to listen to me! I don’t understand it at all.
yield return new WaitForSeconds(.5f); // Telling my computer to wait .5 of it’s seconds
PlayerPrefs.SetInt(“CurrentScore”, currentScore); // It sets the int of the current score
UIManager.instance.endCurrentScore.text = "Total Score: " + currentScore; // It sets the total score.
UIManager.instance.endCurrentScore.gameObject.SetActive(true); // It sets the gameObject to (true)
}
…
…
.
Is that good?
Getting closer! Please try again, and this time, use Code Tags. And also explain by what you mean by “doesn’t want to listen”, so what is the behavior? Please try to avoid colorful language, and just state what is happening (or not happening!) A computer of course doesn’t “listen” to what you are typing. You might want to place some Debug.Log statements in the code so you can see what is going on. So add the Debug.Log statements, show your updated code using Code Tags, and also provide the output of the Debug.Log statements that will show in your Unity Console, when you make your next post. You might want to take a minute to read this forum post and watch the video to learn more about using Debug.Log which will help you (and us!) to troubleshoot your issue https://discussions.unity.com/t/748729/14 If you are receiving an error, please copy the entire error from Unity and paste it here. Please keep us posted!
If you have a problem with the UIManager (I’m assuming this because of the other thread that you made about basically the same problem), then you will need to go back to that lesson and check what you have in your file against what you were supposed to put into the script.
Also all Udemy courses have sections for questions in each lecture, so you might be better off asking the tutor what is wrong - you might even find that someone else had the same problem.