public DCLBuilderInWorldEntity DuplicateEntity(DCLBuilderInWorldEntity entityToDuplicate) { IDCLEntity entity = SceneUtils.DuplicateEntity(sceneToEdit, entityToDuplicate.rootEntity); BuilderInWorldUtils.CopyGameObjectStatus(entityToDuplicate.gameObject, entity.gameObject, false, false); DCLBuilderInWorldEntity convertedEntity = SetupEntityToEdit(entity); NotifyEntityIsCreated(entity); EntityListChanged(); return(convertedEntity); }
public BIWEntity DuplicateEntity(BIWEntity entityToDuplicate) { IDCLEntity entity = SceneUtils.DuplicateEntity(sceneToEdit, entityToDuplicate.rootEntity); //Note: If the entity contains the name component or DCLLockedOnEdit, we don't want to copy them entity.RemoveSharedComponent(typeof(DCLName), false); entity.RemoveSharedComponent(typeof(DCLLockedOnEdit), false); BIWUtils.CopyGameObjectStatus(entityToDuplicate.rootEntity.gameObject, entity.gameObject, false, false); BIWEntity convertedEntity = SetupEntityToEdit(entity); NotifyEntityIsCreated(entity); EntityListChanged(); return(convertedEntity); }