Jump to content

[SOLVED] Creating a new node


photo

Recommended Posts

Trying to create a new node code side and its complaining that it cant find a constructor with 0 arguments, but I have seen several examples of constructing a new node (image_atlas.h, and a post on the forum) that do not have any parameters.   Is that code outdated and the Node constructor now has multiple parameters?  Or perhaps I am not including?  I tried giving it a single string argument as well as one forum post shows, but this didn't work either.

 

"ExternClass::get_constructor(): can't find constructor with 0 arguments"

Link to comment

The function library is up to date, so you can refer to it if in doubt. Please, post a minimal test scene, otherwise we'll have no clue what's happening.

Link to comment

You can repro the issue by adding a single line to the Player Character constructor.

 

C:\Unigine evaluation\data\demos\shooter\scripts\player\player_character.h

 

Add the line 

Node newnode = new Node();
 
to the function
PlayerCharacter(mat4 transform,string property_name) {
 
and you will get the same compile error.
Link to comment

NodeDummy does in fact compile...

Does that mean that C:\Unigine evaluation\data\core\scripts\image_atlas.h 

only complies because its in the core folder?

 

Is there a list somewhere of which objects are inaccessible for construction?

Link to comment
×
×
  • Create New...