OpenSim.Region.Framework.Scenes.Scene.UnlinkSceneObject C# (CSharp) Method

UnlinkSceneObject() public method

Unlink the given object from the scene. Unlike delete, this just removes the record of the object - the object itself is not destroyed.
public UnlinkSceneObject ( SceneObjectGroup so, bool softDelete ) : bool
so SceneObjectGroup The scene object.
softDelete bool If true, only deletes from scene, but keeps the object in the database.
return bool
        public bool UnlinkSceneObject(SceneObjectGroup so, bool softDelete)
        {
            if (m_sceneGraph.DeleteSceneObject(so.UUID, softDelete))
            {
                if (!softDelete)
                {
                    // Force a database update so that the scene object group ID is accurate.  It's possible that the
                    // group has recently been delinked from another group but that this change has not been persisted
                    // to the DB.
                    ForceSceneObjectBackup(so);
                    so.DetachFromBackup();
                    SimulationDataService.RemoveObject(so.UUID, m_regInfo.RegionID);
                }
                                    
                // We need to keep track of this state in case this group is still queued for further backup.
                so.IsDeleted = true;

                return true;
            }

            return false;
        }
Scene