Jump to content

Suggestion: hot reloading on world modification


photo

Recommended Posts

Posted

Hi,

What about hot reloading on world modification?

Use case:

  • A user in VR do evaluation and express wishes
  • Another user updates the world using the editor

Typically that could be implemented with:

  • A specific component system added to the world
  • Some properties listing nodes to be focused on
  • Watching .world, filtering on only previously defined nodes, updating their properties in RT

.. but it is not nicely convenient.

Would it be (already) possible?

Kind regards,
Charles

Posted
On 10/5/2021 at 6:51 PM, Lales.Charles said:

Hi,

What about hot reloading on world modification?

Use case:

  • A user in VR do evaluation and express wishes
  • Another user updates the world using the editor

Typically that could be implemented with:

  • A specific component system added to the world
  • Some properties listing nodes to be focused on
  • Watching .world, filtering on only previously defined nodes, updating their properties in RT

.. but it is not nicely convenient.

Would it be (already) possible?

Kind regards,
Charles

Hello!

Charles, as I know with current capabilities you might try to implement such functionality with hot reloading nodes only

You will need to use the following method https://developer.unigine.com/en/docs/2.14.1/api/library/engine/class.world?rlang=cpp#clearNode_cstr_int

Where "world::clearNode" will clear node reference cache and "world::loadNode" will load edited node

The problem is that demand of usage guides.db and /.runtimes files imposes many restrictions on the ability to do a hot reload after making some world modifications

Thanks

  • Thanks 1
Posted

Hi,

Thanks for hint!
For are the restriction due to guid.db and .runtimes?
If you're not updating meshes or materials, that should be fine right?

Do you confirm it doesn't currently exist?
Would you consider to take it into account?
The potential is there, e.g. to speed up design review with RT update and visualization..

Kind regards,
Charles

Posted

That's doesn't look like a generic functionality, so we don't have any plans to add similar feature in the future SDK updates. As you already mentioned, it can be done quite easily with a custom logic on your application side logic (maybe via custom Editor plugin as well).

 

Quote

If you're not updating meshes or materials, that should be fine right?

Right now we can't see any issues with nodes reloading if no new material / textures are being created during the session, but the devil always hidden in details :)

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 3 weeks later...
Posted

Hi,

In fact, we do see a nice feature / finality here: collaborative work.

Following idea of Stephane, instead of monitoring file .world, we would opt for an editor plugin monitoring the scene (selected nodes) and synchronizing our application.
Is there a nice way, event based, to monitor some node property changes, e.g. smthg Property::addCallback based but not restricted to ComponentBase..?

Kind regards,
Charles 

Posted

You can use Property::addCallback() and World::addCallback() to get some information about changes int the scene and basically that's it. You can place your logic inside EditorLogic class and do some tests.

Not sure how the Editor and it's undo-redo system will react on this :)

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Property::addCallback and Properties::addCallback are not all related to Component?

If we consider simply a node on translation or rotation, is it called?

Can see Node::addCallback exists as well, a possibility?

undo-redo system -> as the plugin materials example use SelectionAction, should it be consider SetNodeTransformAction maybe..?

×
×
  • Create New...