When re-entering the scene, writes "No Cameras rendering". I have 2 scripts, which make the transition to another scene. There are cameras on all the scenes. Saves are not performed anywhere. When the first scene starts for the first time, it starts without any problems. Scene one:
...
bool isFirst = true;
void Update{
...
if(isFirst){
SceneManager.LoadScene("two");
isFirst = false;
}
...
}
...
Scene two:
...
bool isFirst = true;
void Update{
...
if(isFirst){
SceneManager.LoadScene("one");
isFirst = false;
}
...
}
...
And after that, "No cameras rendering" is output.
It is necessary that the action takes place on the first scene, then after its execution, the second scene starts. And then, after completing the task, the second scene would start.
P. S. recently updated Unity Hub, maybe the problem is because of this. The unity version is 2022.3.17f, WebGL.
When re-entering the scene, writes "No Cameras rendering". I have 2 scripts, which make the transition to another scene. There are cameras on all the scenes. Saves are not performed anywhere. When the first scene starts for the first time, it starts without any problems. Scene one:
...
bool isFirst = true;
void Update{
...
if(isFirst){
SceneManager.LoadScene("two");
isFirst = false;
}
...
}
...
Scene two:
...
bool isFirst = true;
void Update{
...
if(isFirst){
SceneManager.LoadScene("one");
isFirst = false;
}
...
}
...
And after that, "No cameras rendering" is output.
It is necessary that the action takes place on the first scene, then after its execution, the second scene starts. And then, after completing the task, the second scene would start.
P. S. recently updated Unity Hub, maybe the problem is because of this. The unity version is 2022.3.17f, WebGL.
Share Improve this question asked Nov 19, 2024 at 8:45 Andrey ShustovAndrey Shustov 11 bronze badge 3- 1 Well this means there is no active camera in your scene so nothing is rendered ... could you provide a bit more code context .. hard to tell what exactly you are trying to achieve and what exactly fails / misbehaves ... – derHugo Commented Nov 19, 2024 at 8:46
- Camera should be present in the scene, its GameObject should be active and Camera component enabled, otherwise this message is shown. Is it possible that some script is enabling/disabling your camera? Btw. Unity Hub has no impact on your project, you should not worry about it. – Vladimir Commented Nov 20, 2024 at 14:03
- I realized that it's not about the script. I created a copy of the problematic scene and deleted this script from the scene, but the problem did not go away. Then I disabled all the objects in this scene except the camera, and there was no error. If anything, the camera was on in the first and second scenes. – Andrey Shustov Commented Nov 20, 2024 at 15:07
1 Answer
Reset to default 0I found the problem. the fact is that in the main player control script there was a page where there was a check for true. If false, the line of making the camera inactive was executed.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745572665a4633774.html
评论列表(0条)