![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Lapiz (Quarstudz) |
So basically I found this code:
instance_from_id()
What does this mean? and also how can I find the id of the instance?
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Lapiz (Quarstudz) |
So basically I found this code:
instance_from_id()
What does this mean? and also how can I find the id of the instance?
![]() |
Reply From: | gmaps |
It retrieves an instance of an object whose id you provide as a parameter. So you could for example iterate over your objects and save their id’s in array by using: get_instance_id
function. And if you needed an object you could retrieve it with instance_from_id
function.
Both functions are documented here:
And they are both inherited by basically all objects in godot.