[Unity Tutorial] Main Menu, Pause Menu, Music, Save, Load!
Join the Discord Chat if you need more help! : https://discord.gg/zRgZqqN
UPDATE: 2016/AUGUST 08!
Clarification on this save/load feature:
It is meant to load from the start of the scene. Not from the place the player was. To save the position, you'd need to save more variables! If I see enough interest, I might do a video on this.
Everyone has been getting a small problem with this code. This is happening because Unity added a SceneManager. To go around this issue, follow these steps:
1. Add "using UnityEngine.SceneManagement" where all the other "usings" are. This allows you to access that part of Unity to save your Scene.
2. Change "Application.loadedLevel" for SceneManager.GetActiveScene().buildIndex on your Save method.
3. Change "Application.LoadLevel()" for SceneManager.LoadScene(PlayerPrefs.GetInt("currentscenesave")); in your Load method
4. That should work! Please let me know in a comment if this fix is functional (it works in my computer but sometimes it's weird like that)
This code has a little issue with Unity version 5.3. As soon as you load the Pause Scene (which is just a trick I wanted to show you and you don't have to use it by any means), if you keep pressing ESC, you'll get many many Pause Scenes. This is fixed by setting a bool "paused" and if the game is paused, don't load the Pause Scene anymore. Try it and if you have issues, let me know. I might go back here and redo some things in a new tutorial.
Full project files: https://mega.nz/#!QoklFCZY!xUnIEhX2QZmJBadVSKbH_tUJptG7x6AQtU2YVzpHLiI
More Information in the Text Post at:
http://ramondev.com/tutorials/?p=446
Music used in the Tutorial:
https://mega.nz/#!xx92iBjY!SqIxBMDifp...
Welcome to this sixth installment of: Unity Tutorials, how to think in Unity Language.
First long video, and I think it's well deserved. A good Pause menu, interactive and useful, says a lot about how much detail you're willing to put into your game.
I recommend you guys try it out for yourselves and also that you read the text help.
Try my Tutorials at:
http://www.ramondev.com/tutorials
Visit the forums at
http://www.ramondev.com/forum
What do you guys want to see next? I'm open to suggestions (Even though I already have something planned!)
Check my patreon out! https://www.patreon.com/ramondev?ty=h or Donate to paypal at: https://paypal.me/ramondev
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «[Unity Tutorial] Main Menu, Pause Menu, Music, Save, Load!», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.