Как переименовать сцену
Как перезапустить сцену?
Не могу перезапустить сцену, точнее сцена перезагружается, но враги перестают спавнится и.
Как затемнить сцену?
Приветствую! Такая беда: В моей 2D игре игроки, подключённые по сети, бегают по ЗАТЕМНЁННОЙ сцене.
Как узнать текущую сцену (уровень)?
Как узнать текущую сцену и вывести её в переменную? Должно получиться что то типа этого: scen =.
Как сохранить сцену после нажатия?
У меня есть игрок который может перемещаться по сценам. Например когда он первый раз зашел на сцену.
Scene.name
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Submission failed
For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.
Description
Returns the name of the Scene that is currently active in the game or app.
Scene.name
Возвращает название сцены, которая в данный момент активна в игре или приложении.
Scene.name возвращает строковое значение времени выполнения, доступное только для чтения. name ограничено 244 символами. Имя сцены по умолчанию равно scene . Пользователь изменяет name во время создания игры.
Следующий пример скрипта изменяет сцену в зависимости от нажатия GUI.Button и имени сцены. Чтобы этот пример работал:
- Создайте проект с двумя сценами: scene1 и scene2 .
- Прикрепите приведенный ниже сценарий к GameObject, добавленному в scene1 .
- Прикрепите тот же скрипт к GameObject, добавленному в scene2 .
- Нажмите на GameObject и перейдите в Инспектор.
- В поля My First Scene и поля My Second Scene введите названия сцен, которые вы хотите переключить. между scene1 и scene2 .
- Выберите scene1 , дважды щелкнув ее в проекте, и нажмите Play . Появится сцена scene1 .
- Нажмите кнопку Load Next Scene , и scene2 будет загружена.
В следующем примере используются две сцены, одна из которых имеет длинное имя Scene из 244 цифр. Другой называется testScene . Чтобы этот пример работал:
- Создайте новый проект.
- Измените имя сцены по умолчанию на testScene , выбрав ее, а затем используйте Assets->Rename.
- Далее создайте вторую сцену, снова выберите ее и используйте Актив->Переименовать. Используйте имя, как показано ниже. (Это имя из 244 символов «0123456789. 0123»).
- Создайте сценарий C# и назовите его Example.cs .
- Добавьте следующий текст скрипта в Example.cs .
- Затем добавьте пустой GameObject с именем GameObject в каждую из двух сцен.
- Наконец скопируйте Example.cs в каждый из двух игровых объектов.
Используйте кнопку Игра , чтобы запустить сцену testScene . Показана кнопка графического интерфейса, которая позволяет переключаться между сценами.
How to change your project name in Unity Hub

Here’s a little idea if you’ve ever been bothered by the inability to change your project name in Unity Hub. Let’s say your project uses a directory structure that looks like the following:
Now if you’ve got 10 games using a similar structure, then you’ll likely see 10 projects with the name “Unity” in Unity Hub. That’s a bummer to pick through.
CREATE A “UNITY PROJECTS” DIRECTORY
Well, we can solve this with a simple symlink. The first thing you’ll want to do is change where you’re saving all your Unity projects. You’re now going to store them all together. Find a place on your machine and get to this point:
They’re all going to live together in one spot, which is actually somewhat convenient if you’re just looking for a particular game directory.
These projects can be added to the Unity Hub now and they will correctly display their descriptive names. Cool! We’re done with the first step.
CREATE A SYMLINK
Now we turn our focus to our all-encompassing project folder. You know, the one that has all the stuff in it and not just the Unity project. I’m on a Mac so this next step may differ for you, but the principal should be the same.
USING THE FINDER
You can create a symlink or “Alias” by right-clicking on your project in the Unity Projects directory and choosing Make Alias.

You can then name that alias anything you like. I chose to call it “Unity”. Move that symlinked directory back to your all-encompassing project folder. Voilà! You’ve got the correct name in Unity Hub and a custom name in the directory on your computer.

USING TERMINAL
If you prefer using the Terminal to create symlinks the syntax is:
I’m assuming you can figure it out from there if you’re a regular Terminal user.
THANKS
Thanks to @JesterBrazen for the suggestion on this one. It gets the job done!