TokisanGames / Terrain3D

A high performance, editable terrain system for Godot 4.
MIT License
2.03k stars 116 forks source link

c++ CodeGenerated #452

Closed 28176004 closed 1 month ago

28176004 commented 1 month ago

Terrain3D version

0.9.2

System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (NVIDIA; 32.0.15.5612) - Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4 Threads)

Is the issue reproducable in the demo?

Yes

Issue description

I updated the new version.There are some errors, the previous version seems to be fine.

class Terrain_test : public Node3D {
  GDCLASS(Terrain_test, Node3D)

protected:
  static void _bind_methods() {

    };

public:
  Terrain_test() {};
  ~Terrain_test() {};

  Terrain3D *terrain;
  void _ready() {
    terrain = memnew(Terrain3D);
    terrain->set_storage(memnew(Terrain3DStorage));
    terrain->set_assets(memnew(Terrain3DAssets));
    add_child(terrain);
    if (Engine::get_singleton()->is_editor_hint())
      terrain->set_owner(get_tree()->get_edited_scene_root());
  }
}

debug log

Terrain3D#4336:_notification: NOTIFICATION_PREDELETE
Terrain3D#4336:_clear_meshes: Clearing the terrain meshes
Terrain3DStorage#6224:_clear: Clearing storage
Terrain3DStorage#6224:set_multimeshes: Loading multimeshes: {  }
Terrain3D#0695:_notification: NOTIFICATION_ENTER_WORLD
Terrain3D#0695:_notification: NOTIFICATION_ENTER_TREE
Terrain3D#0695:_initialize: Checking instancer, material, storage, assets, signal, and mesh initialization
Terrain3D#0695:_initialize: Creating blank material
Terrain3D#0695:_initialize: Creating blank storage
Terrain3DStorage#0937:set_version: 0.920
Terrain3D#0695:_initialize: Creating blank texture list
Terrain3D#0695:_initialize: Creating blank instancer
Terrain3D#0695:_initialize: Connecting _assets.textures_changed to _material->_update_texture_arrays()
Terrain3D#0695:_initialize: Connecting region_size_changed signal to _material->_update_regions()
Terrain3D#0695:_initialize: Connecting _storage::regions_changed signal to _material->_update_regions()
Terrain3D#0695:_initialize: Connecting _storage::height_maps_changed signal to update_aabbs()
**ERROR: Cannot connect to 'height_maps_changed': the provided callable is not valid: <CallableCustom>
   at: (core/object/object.cpp:1323)**
Terrain3D#0695:_initialize: Connecting _assets.meshes_changed to _instancer->_update_mmis()
Terrain3D#0695:_initialize: Connecting _storage::multimeshes_changed signal to _rebuild_mmis()
Terrain3DStorage#0937:initialize: Initializing storage
Terrain3DMaterial#3720:initialize: Initializing material

Logs

No response

TokisanGames commented 1 month ago

Everything else works except AABB calculation and it produces this error?

There's no real difference between connecting to height_maps_changed and regions_changed right above it. https://github.com/TokisanGames/Terrain3D/blob/v0.9.2-beta/src/terrain_3d.cpp#L62-L69

Both use callable_mp which is a godot function bridged by godot-cpp. Godot-cpp has been upgraded since 0.9.2. Please test a nightly build and see what happens.

28176004 commented 1 month ago

thank you

TokisanGames commented 1 month ago

Is it fixed with a nightly build?

28176004 commented 1 month ago

i use new godot-cpp,is same fail,i will change msvc,if has result ,i will report