Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an editor object via c++ #1064

Open
aceinetx opened this issue Sep 7, 2024 · 2 comments
Open

Add an editor object via c++ #1064

aceinetx opened this issue Sep 7, 2024 · 2 comments
Labels
question Further information is requested

Comments

@aceinetx
Copy link

aceinetx commented Sep 7, 2024

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?

@aceinetx aceinetx added the question Further information is requested label Sep 7, 2024
@TheSillyDoggo
Copy link
Contributor

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

@aceinetx
Copy link
Author

aceinetx commented Sep 7, 2024

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants