How to check if object is valid?
1 1

1 post in this topic

Recommended Posts

Let's say I have a variable:

obj = nil;

Let's say I initialized it somewhere:

for i = 0, worldObjects:size() - 1 do
	obj = worldObjects:get(i);

Then some time passed. The object could be removed from the world.

How to check that the object referenced by a variable still exists?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1