Access to an old version of the build API?

Hey hey :slight_smile:

We are trying to support a pretty old project of ours, it is about 2 years since we last actively worked on it. Since then, we mostly did some small bugfixes and updates, but nothing major.

To not worry about introducing new bugs through engine updates (e.g. we are still using the deprecated pc.ModelComponent instead of the pc.RenderComponent), we cached a build of the pc engine v1.46.5. Whenever we would make a new build, we would replace the playcanvas-stable.min.js file in the build folder. To be able to use the editor, we would always start the launcher with the url parameter &version=1.46.5. This mostly worked fine, we encountered some warnings that we were able to ignore, since they were often gone once we started the game locally with the old engine version.

But some time ago there were some big changes in the editor api and how the engine initializes the pc.Application, I think this is related to the preparation to support WebGPU? Since then it is no longer possible to launch the game from the editor with the url parameter with a version 1.61.x or lower. 1.62.0 is the oldest one that still works. When we now use the build api to download our game and then replace the playcanvas-stable.min.js with our cached version, the game doesn’t start locally because of this error
image

Now my questions:

  • Is there a way to access an old version of the build api to be able to still download the game like before and again simply replace that one file? If possible we don’t want to update the game by 17 minor engine versions :sweat_smile:

  • Is there no way to again use the editor with a version older than 1.62.0? This one is not as important though, as our game still seems to run with the engine version. It’s just a bit more of a hassle to build and locally start the game to see whether some warnings/errors still need to be fixed or are still working with the older engine.

Thanks for any insight I can get here
Alex

Its most likely due to to the boilerplate being changed in an Editor release.

See here for a possible workaround Editor debug view compatibility with older engine versions - #4 by yaustar

1 Like

Thanks for you fast reply, and sorry that mine took so long :sweat_smile:

I tried the module-patch you provided in the linked post. Unfortunately the example project doesn’t work with any engine version below 1.62.0 anymore, so some other things have changed as well.

Do you think it is possible to patch enough engine code that we could get it to work again? Or is this a case where we need to bite the bullet and update our project to a newer engine version?

1.62.0 is from March this year, apart from shader changes there should not be many API breaking changes in the engine. So if you don’t use custom shader chunks, if might just be easier to update to the new engine. I assume you’ve tried running with the latest engine and are getting some problems?

It’s hard to advice on changes that might break Editor using the old engines, as we don’t test that, it’s possible there are many changes, or just very few.

2 Likes

It wasn’t too bad when using the latest engine version. We are using some custom shaders, but not too many. We do have a lot of warnings which we ignored until now, but luckily almost no errors, and nothing that actually breaks the game. But since it is a very old project, we didn’t yet test it as thoroughly as we did 2 years ago, so we might not be aware of all issues.

One thing that comes to mind is that we are still using the pc.ModelComponent, which is deprecated. Does it still work with the new shader chunks and do we only need to fix the shader code? Or would we need to make bigger changes by replacing it with the new pc.RenderComponent?

I will discuss this with my colleagues again and think about our next steps. Thanks for your insight.

Model component is deprecated meaning we’re not recommending this as the main component, as render component has multiple advantages, but it’s fully supported and we’re not planning to change that anytime soon. There is no reason to not using it in existing projects.

2 Likes