Jump to content

[SOLVED] Help!How to clear scene ?


Recommended Posts

I got a problem,

 

Each Sample scene  at Physicals like "force01.world" or "wind00.world" etc.

 

Every time after I save those scene , all nodes will be double when I load the scene again!

 

Double light ~ Double Force ~Double wind~ Double boxes~ Double plane~

 

It seems that every nodes creats once at init and don't remove when shutdown.

 

That's horrible! :(

Link to comment

Hi,

 

Most of the samples are generated via Unigine Script (*.cpp file near the *.wolrd) on fly, so their *.world files contains only references to material libraries.

 

After some editing process in Unigine Editor and saving the world manually you store all the data in scene directly to the world file. And when you are opening sample second time you will get objects from *.world and generated objects from Unigine Script.

 

You can comment all logic that generates sample scenes by editing the *.cpp file. Basically, you need to delete all Unigine Script code, which generates scene. For example, in samples/physicals/force_00 you can delete all content from force_00.cpp after saving the *.world file in Unigine Editor.

 

After second load you will not get any weird behaviors in Editor, but when you will try to open this scene without editor you will get only black screen. You will need to setup basic init(), update() and shutdown() functions. Please, check the modified force_00 sample in attachement.

 

Thanks!

 

physicals.zip

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

Link to comment
×
×
  • Create New...