Anyway, it seems that the API has changed and there are several things that I used to do that don’t work anymore, like creating a script or accessing the skybox.
They don’t work because the function does not exist anymore, so the project would not provide much information. I just need to know the new syntax.
AFAIK, the API hasn’t changed since 2016 for creating new scripts.
var OrbitCamera = pc.createScript('orbitCamera');
OrbitCamera.prototype.initialize = function () {
var self = this;
var onWindowResize = function () {
self._checkAspectRatio();
};
};
//etc
Are you using the Editor or just the engine? The API hasn’t changed so if you don’t want to share your whole project just add me to take a look. My username is vaios.
I think the dev team launched an important update of the engine (or are about to), so maybe there’s things that change! Always happen on evolving software, no biggie, we can help each other.
Again that all sounds weird. First of all you’re saying that before you were able to create a new entity and call entity.script.create on it without adding a script component? That would have never worked. They skybox would be null if you didn’t set one for you scene.
My impression is that something has changed in your project - otherwise if you can add me to a project that shows this behaviour then I could have a look.