[Python]Please help me delete an object with name

You know the name of the object you want to delete. Can I delete a specific object based on its name alone?

In Python


The Koblox code is like this.

Deleting an item named Bear

Hi @jeny2026 ,

This code removes the bear in the start.
To delete the bear by clicking on it, use the commented code (bear.input.on_click(bear.delete))

bear = scene.get_item("U362gzUG")

def remove(item):

# bear.input.on_click(bear.delete)

Hope this helps,

1 Like

Thank you for answer.
What I’m curious about is whether it is possible to delete an object using its name.
When there are multiple replicas, give the replicas a name,
I want to delete a duplicate object with a specific name.
For example, when I press the red button, I want to delete the duplicate object named “copide_girl5”.
I want to know how to give commands to an object using the name of the clone.
I’m studying Python. help

Please check this out DGP-HAU


oh!! Solved.!! thank you :heart_eyes:

1 Like