Skip to content

Questions on de-spawning and remove functions from Schematics and ProtoCommands/ProtoEntityCommands #49

Answered by MrGVSV
hafiidz asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hafiidz, really sorry for being so late to respond to this (got some life stuff going on lol).

The remove functionality is mainly meant for two scenarios:

  1. Removing the effects of a prototype on an entity
  2. Undoing world changes outside the scope of the prototype entity

The example is demonstrating scenario 2: the apply method spawned in some camera entities that were not children of the prototype entity and so when we remove that prototype, we want to "undo" that world mutation by despawning those cameras.

If all schematics in your prototype are just components/bundles, with no other special Schematic implementations, then I would just opt for the normal commands.despawn. Otherwise, l…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MrGVSV
Comment options

Answer selected by hafiidz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants