PlayCanvas Editor Feedback

I noticed something that is odd in PS editor: when you edit a value in a text/number/color field and press the esc key, the value change is not cancelled which I would claim is the expected and standard behaviour.

Enter key should commit the change, esc should cancel it.

1 Like

the docs about Button is outdated - the buttons no longer have a script component, but they have a Button component. It is not explained at all how call a function when a button is pressed.
https://developer.playcanvas.com/en/tutorials/ui-elements-buttons/

Iā€™ve added an issue to update the documentation and tutorial: https://github.com/playcanvas/developer.playcanvas.com/issues/158

If you see any more issues if be great if you can add them to the issues backlog on GitHub:
Documentation: https://github.com/playcanvas/developer.playcanvas.com/issues
Editor: https://github.com/playcanvas/editor/issues
Engine: https://github.com/playcanvas/engine/issues

Edit: @jariwake Hereā€™s an example that uses buttons that could help if you are bit stuck: https://developer.playcanvas.com/en/tutorials/additive-loading-scenes/

Any ETA on when native GLBs will be supported by the editor? We usually develop without it, but itā€™d be very useful if downloaded scene JSON files contained references to native GLBs for pre-loading.

Unfortunately, we are looking at Q1 next year. First on the list is to being able to import FBX files as scene hierarchy (so all the nodes in the models are shown as Entities in the scene).

Our main problem with GLBs is that they can effectively be a whole scene with lights, cameras etc.

There are some workarounds where you can import the GLB as a binary where it is preloaded and parse it at runtime which is pretty fast.

Yeah, thatā€™d be great actually. Weā€™re currently using loadFromUrl at run-time to load it, and weā€™re mostly just trying to avoid the popping in even if itā€™s only for like half a second to a second and a half. Is there some kind of documentation on preloading? Me and my brother canā€™t seem to figure out how to add our own files to be preloaded during the loading screen from stand-alone PlayCanvas

The way I do it is the following https://developer.playcanvas.com/en/tutorials/loading-gltf-glbs/

Where the time it takes to show in view is the time it takes to parse.

You can modify the (pre)loading script with one of your own https://developer.playcanvas.com/en/user-manual/designer/loading-screen/

Yeah, it seems like even though itā€™s pre-loaded it still takes a second to load in once the app is started. I think our current method of just keeping the loading screen up for a couple seconds longer and keeping gravity off until the collision GLB fully loads in would be the same anyway, but Iā€™ll try switching to that method for our next project. Thank you

Alternatively, you can have a very short preload screen and have an in game loader that loads all the assets, GLBs, etc so you have more control within the game context.

Hmm I think I get what you mean, using the then functions of the loaded assets I suppose. Iā€™ll look into that. Thank you, I appreciate it!

First on the list is to being able to import FBX files as scene hierarchy (so all the nodes in the models are shown as Entities in the scene).

I am excited to see this!

I am curious, though. Would you also, then, have the ability to manipulate FBX models that have their origin at (0,0,0)? I have run into issues where I try to scale an FBX, only to have itā€™s position in the scene change because itā€™s offset is scaling, too.

It would be nice to be able to ā€˜breakā€™ these objects out of their root-origin, allowing for the manipulation of them as simple objects.

It should do but if it has animation, then all bets are off.

Oh, I guess that would be hard to convert the anim data, yeah.

No, for the most part, we use static geometry. We had a scene, in particular, with a lot of models, and I was concerned about them all being ā€˜at the originā€™ for the sake of depth sorting. Iā€™m not sure whatā€™s more efficient. Any thoughts on that?

I didnā€™t ask my artists to re-build the scene with assets at their own positions. We were in a rush against a tight deadline, and I didnā€™t have time to explore all the options. We got the performance back with lighting changes and mesh-merging. But, Iā€™ve been thinking about this issue.

Thatā€™s a good question, @mvaligursky, any thoughts here?

Iā€™m not sure I follow by what you mean you had lots of models at the origin. Could you add some more details to this?

In general, youā€™d import lots of models and place them at different locations to build a scene right?

Even if many entities have their location at origin, individual meshes would be offset I assume ā€¦ so their bounding boxes would have different centers, and those are the positions used for distance sorting, if thatā€™s how the layer is configured.

Most often, my artists import their FBX from StudioMAX. They often build out the whole scene, including lighting, in their tools, rather than in the PlayCanvas editor. It seems that all the models end up with a position of (0,0,0), yet the meshes are offset to the correct position in the scene.

This can make it difficult to tweak the scene. For example, if I want to scale or rotate a model, I will also have to re-position it.

So, yes, my question is about objects centered at the origin, and offset to their proper location in the scene. When these objects are selected in the editor, the bounding box appears to include the origin. This is why I asked about efficiency ā€˜under the hood.ā€™

That does not sound like a conventional way to export fbx from studio Max. Do they reset xforms / manually set pivot points to origin or something like that? Normally all meshes have pivot point inside of them, so when you rotate them in local space, they rotate around their ā€œcenterā€, or any other point you need them to rotate around (say for furniture youā€™d place the pivot at the center bottom of the bounding box, so you can easily place them on the ground). When you then select the mesh in the Playcanvas Editor, the bounds should only include meshes in that Model, but not origin as well.

For static scene objects, itā€™s a convenience for the artists to be able to create the whole scene in StudioMax (or whatever their preferred tool) and import it in ā€˜chunksā€™. And it means that the whole scene can be scaled or adjusted simply within the editor.

It does create some problems for me, however, if I need to manually adjust one element, but not all the others. It seems like your new FBX/GLB features might help in this regard.

Yes, we are working on being able to import the model heirachy into the scene so you can move/scale/add scripts etc. Does this sounds like what you are asking for?

Yes, precisely. Itā€™s a big work-flow hassle to have to break up an FBX, and re-import. So, this is a really nice improvement for us.