Jump to content

Prefab's and scene:RemoveEntity(self.entity)


Go to solution Solved by Josh,

Recommended Posts

Posted

As discussed on discord this morning, 

I have a loaded prefab with a componet attached to it, the component is suppose to remove itself after the first update, this works fine for all non-prefabbed instances..

I call this at the end of the Update() function

    scene:RemoveEntity(self.entity)
    collectgarbage()

But it does not remove.  Mind you all other mdl's loaded not through a prefab work.
You mentioned this 'may' be a bug. 

I also have this in my main loop

        --Garbage collection step
        collectgarbage()
  • Like 1
  • 3 weeks later...
Posted

That seems very strange. If you have any problem in the future and can provide an example for me to test, please let me know.

  • Like 1

Let's build cool stuff and have fun. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...