geode-sdk / geode

The ultimate Geometry Dash modding framework
https://geode-sdk.org/
Boost Software License 1.0
751 stars 131 forks source link

Add an editor object via c++ #1064

Open aceinetx opened 2 months ago

aceinetx commented 2 months ago

Your Question

I tried editor_ui->createObject but it crashes the game with exception access violation (EditorUI::createObject + 121 | C:\Users\aceinet\code\LevelEdit\build\bindings\bindings\Geode\GeneratedSource.cpp:10149), do I need to create an undo point (but I don't know how to do that since editor_ui->createObject does not return GameObject*) or something?

TheSillyDoggo commented 2 months ago

LevelEditorLayer::get()->createObject(objectID, position, true)

aceinetx commented 2 months ago

LevelEditorLayer::get()->createObject(objectID, position, true)

Thank you! You probably saved me 2 days of my life lol