Something happened need help please

So my scene looks like this now after duplicating it. All level work up till now appears to be gone or missing.

Do I have to set up the tilemap grid all over again? and no I don’t have a backup to revert to.

Yes, this scene is completely empty. You say you have no backup, but you also say you duplicated it. What did you duplicate it from?

How are you getting on with this, @Jackn_The_box?

Ok, I guess. Had to recreate the scene from scratch, luckily, I had a screenshot of it saved so I was able to exactly reproduce the original design. That was going smoothly, and I created 2 more levels and added some extra mechanics that weren’t taught in the course.

I worked on the project last night, closed it out and everything was fine. Booted it up today, and it’s like none of the player’s values are being calculated correctly. Player barely moves or jumps with the current values. I dont really want to tweak them and offset other mechanics.

Also in the animator, can’t see anything happening on the states. A blue bar is supposed to repeatedly fill up when the animation is set to loop. Nothing is happening yet the animations are working.

Finally, the exit portal isn’t working anymore either. It just pushes the player back on the x axis a few tiles.

This all happened from just booting up Unity today with no modifications to any editor or script properties.

Rebooting the editor does nothing.

  1. Make a backup of your project folder by duplicating it. Save the duplicated folder somewhere else, maybe on an USB stick. To save some free space, you could delete the Library and Temp folders in the backup folder.

  2. Check where you saved your project (not the backup). Is it in a normal folder on your normal harddrive? Do not keep it in the Desktop folder because that folder is managed by Windows. Also do not keep your project folder inside Unity’s installation folder.

  3. Do you use an antivirus program or a firewall that might be blocking Unity?

  4. Your version of Unity is a bit older. Maybe you are experiencing a bug. Try to update. Then import your project into it. If it breaks, you still have your backup.

  1. Completed

  2. Completed (check)

  3. Completed (No)

  4. Updated (Still not working)

Forgot to add that in two levels I have moving platforms that activate only when the player jumps on them. Now they continue to move forever off screen lol.

I’m truly at a loss here.

That’s not something you can complete. That’s something you have to ensure. If you save your project in a managed folder, it might be that Unity or Windows or something else delete files in your project.

One more thing you could do: Please go to the top right corner of Unity. Click on Layers and make sure ‘Everything’ is visible.

And do not duplicate any scenes. In some versions of Unity, the new scene is still connected with the original scene, and when you change something, the other scene changes, too. Maybe that happened here. If all layers are enabled, try to create a new scene by not duplicating an existing scene. Then test that scene.

Last but not least, is your project really named ‘project (1]’? If so, try to rename it, and use A-Z, a-z and 0-9 only. Not any special characters. The same goes for the folder path because Unity cannot process non-Latin characters well.

Yes I completed in the same way you meant ensure. I don’t have it on the desktop :slight_smile:

Yes everything is visible on layers.

Yes the scenes are duplicated, I followed the instructions Rick laid out.

I made a new scene that wasn’t duplicated. No difference.

No my project is not name 'project (1). it is named Platformer. (it was named this at first :upside_down_face: but has since been renamed)

Could you please fill out our form and send me your zipped project (without the Temp and Library folders)? I’d like to take a look into this. Maybe I’ll be able to recreate your problem on my computer. Don’t forget to add a link to this thread.

When you are done, drop me a line here, so I can check our server.

Hey I submitted the form.

Thanks. Unfortunately, I was not able to recreate your problem in Unity 2022.3.1f1. This is what I see in scenes ‘TVRedux’ and ‘Level 1’.

Is the problem somewhere there? Or could you tell me how to recreate the issue?

By the way, when I imported your project, there was an issue with the Library. Some ‘Feature2D’ package was not found. Since I use a slightly older version than you, it might be that this package was added by Unity in your version. Or maybe you installed it yourself? Maybe that another look at the Package Manager in your Unity version to see if there are any updates, broken or missing packages.

If there are none missing or broken, close Unity and Visual Studio Code. Then delete the Library folder. Open Unity again. This might take a while because Unity will recreate the Library folder. Open your scene.

If that didn’t help either, make a backup of your project folder by duplicating it. Save the duplicated folder somewhere else, maybe on an USB stick. To save some free space, you could delete the Library and Temp folders in the backup folder. Then install another version of Unity and import your project (not the backup!) into it. Perhaps there is a bug in your version.

The first pic is the problem. The character is only jumping one tile high. Also check level for me and click on scene view and you’ll see the platform issue I was talking about.

Did you not interact with the portal and see that was only pushing the character back?

I didn’t install any such feature.

I’ve tried deleting the library already since Unity generates it automatically upon launch. It doesn’t affect anything.

Some of the jumps are pixel perfect. I had the values set as such that it would just barely clear a few gaps.

Unfortunately, I am not able to reproduce this problem. See the gif I created for you:

Animation_01


The portal works fine as well. According to your code, the same scene gets loaded again unless nextSceneIndex == SceneManager.sceneCountInBuildSettings is true. Your player spawns at the inital position of Level 1. If you don’t want this to happen, have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?

Oh OK, guess idk what to do then.

Well, you could start with comparing your code to Rick’s to fix the issue with the portal. And if you notice a difference, you fix your code accordingly. :slight_smile:

Regarding the problem with the jump, I would suggest to add Debug.Logs to your code to analyse the situation. For instance, just because your player jumps, does not mean that you know his velocity. Maybe your velocity didn’t get applied correctly, or something else is going on. That’s impossible to tell just by looking at the game window.

If the values are the expected values but the result is diffent anyway, make a backup of your project folder by duplicating it. Save the duplicated folder somewhere else, maybe on an USB stick. To save some free space, you could delete the Library and Temp folders in the backup folder.

Then install a newer version of Unity (no alpha, no beta!) or the same as mine. Then import your project into it.

It randomly fixed itself. Love unity…

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms