[SOLVED] Camera shows nothing when switching scenes

Try adding this to some script (info an update function)

if (this.c === undefined) this.c = 0;
this.c++;
pc.Tracing.set(pc.TRACEID_RENDER_FRAME, this.c % 100 === 0);
pc.Tracing.set(pc.TRACEID_RENDER_PASS, this.c % 100 === 0);
pc.Tracing.set(pc.TRACEID_RENDER_PASS_DETAIL, this.c % 100 === 0);

It prints every 100th frame what gets rendered. That might give you some info.

In my test, it shows this:

in 1: RenderPassForward, it renders 6 layers with Camera named Untitled, and also number of meshes submitted.

I do not have a camera named untitled, what does this mean?

This is logging from my project, not your project. I leave that to you :slight_smile:

1 Like

I don’t know, for some reason it does this with specific scenes, this might be engine itz drivin me crazy!

Can you create a fork that makes the issue easy to reproduce? ie it should take next to no effort to recreate the problem

Do you just launch from Scene 7?

yes, it should play an animation then change scenes, it does but you can’t see ANYTHING

It is not easy to reproduce, it seems very strange and I have no clue what the problem is

I finally solved the issue, I have a limit fps script that would render every so frames, but since the End and Intro scenes did not have one the last updated render was right before the scene switch! Thanks guys for the help! :slight_smile:

1 Like

Yep, I just found the issue as well. The easy fix is to change the destroy function to ensure that autoRender is set to true .

// initialize code called once per entity
LimitFps.prototype.initialize = function () {

    this.on('destroy', function () {
        clearInterval(this.intervalId);
        this.intervalId = null;
        app.autoRender = true;
    });
1 Like