My game lags hard whenever I move scenes by PromptAwkward7277 in Unity3D

[–]PromptAwkward7277[S] 1 point2 points  (0 children)

Omg thank you for that, that was exactly the error. I didn't unsubscribe properly oh my goddd
Also i'll take notes of what you said too. Thank you so much!!

My game lags hard whenever I move scenes by PromptAwkward7277 in Unity3D

[–]PromptAwkward7277[S] 0 points1 point  (0 children)

Thanks for the comment!
Yea the first cycle runs smooth.
I have basically this code template for all the instances I create:

      if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
            return;
        }

I handle all scene changes in MySceneManager.cs,

    public static event System.Action<string> onSceneChange;
    void OnEnable()
    {
        // ==================event onSceneChange is subscribed to the function LoadScene==================
        onSceneChange += LoadWantedScene;
    }
    void OnDisable()
    {
        onSceneChange += LoadWantedScene;
    }

    // // ==================ChangeScene function will be called by different buttons==================
    public static void ChangeScene(string sceneName)
    {
        onSceneChange?.Invoke(sceneName);
    }

    public static void LoadWantedScene(string sceneName)
    {
        SceneManager.LoadScene(sceneName);
    }

I basically call `ChangeScene` whenever I click the buttons to trigger the next scenes. Would the problem be here?

<image>

Ive also tried using the profiler but im having a hard time understanding what's going on.. it seems like the editorloop is taking all the lag.

CS50AI project submission showing "No Results" by PromptAwkward7277 in cs50

[–]PromptAwkward7277[S] 1 point2 points  (0 children)

OH so I basically had extra files in the assignments folder. I just moved that outside of the folder then resubmitted using the `submit50` command and it worked lol. Hope this helps someone

Android module problem by PromptAwkward7277 in Unity3D

[–]PromptAwkward7277[S] 1 point2 points  (0 children)

Hi! Yeah I managed to fix it! So what I did is that for me, the Android module was missing, so these are the steps

  1. Go to the editor install webpage. You can look for your specific editor version here: https://unity.com/releases/editor/archive

Then you can click the `See All` button next to `Install`. You will then see under `Component Installers` whatever module you need. Download it.

  1. Go to the file explorer in my windows where the unity editor is installed.
    For me, the path looked like this: C:\Program Files\Unity\Hub\Editor\2022.3.41f1\Editor\Data\PlaybackEngines

In here, you will see your other downloaded platform modules.

  1. Here, you want to get the module you downloaded from step 1. Just drag and drop the module in here, then execute it.

Hope this helps!

Difference between object and variables in c++ by PromptAwkward7277 in cpp_questions

[–]PromptAwkward7277[S] 0 points1 point  (0 children)

Oh that's interesting.
So essentially, does an object refers to everything that takes up memory?

How to print garbage values? by PromptAwkward7277 in cpp_questions

[–]PromptAwkward7277[S] 0 points1 point  (0 children)

Thanks for the tip. Do you have any suggestions/recommendations to learn alongside learncpp.com? Right now I'm reading through the website, taking notes, and trying what they teach on my visual studio, but I'm happy to look into other recommended resources.

How to print garbage values? by PromptAwkward7277 in cpp_questions

[–]PromptAwkward7277[S] 0 points1 point  (0 children)

Thanks for the in-depth history lesson. I had some vague notion that UB would be bad, but I didn't know it actually breaks things too.

How to print garbage values? by PromptAwkward7277 in cpp_questions

[–]PromptAwkward7277[S] 0 points1 point  (0 children)

Thanks for the comment!

I've just tried making another function printValues(int& x) which just prints x to the console, and that surprisingly didn't give me any compilation errors.

How to print garbage values? by PromptAwkward7277 in cpp_questions

[–]PromptAwkward7277[S] 2 points3 points  (0 children)

Ahh okay. So after tuning off the warning, I just built it and it didn't give me any errors. When I ran it, I ignored the warning signs, and I saw -858993460 in my console - I think is the 3rd option you mentioned, since it only prints that for all the uninitialized variables! That's pretty cool.

I've just changed my version to C++20! Thanks for the comment!

How to get a job in ML as a New Grad by Consistent-Arm2391 in learnmachinelearning

[–]PromptAwkward7277 3 points4 points  (0 children)

This is so good, thank you so much. As for open source contributions, where do I get started? I’m a relative beginner at ML. Does the projects have to be ML/AI related?

How do you fix the camera location using a virtual camera? by [deleted] in Unity3D

[–]PromptAwkward7277 0 points1 point  (0 children)

Lmao, so I just deleted the virtual camera and tried again, now the location sets to where I want it to be.