> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/flatredball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/flatredball/api/flatredball/spritemanager/removespriteoneway.md).

# RemoveSpriteOneWay

### Introduction

The RemoveSpriteOneWay method removes the argument Sprite from the SpriteManager (for both rendering and automatic updates) but does not modify any relationships between the Sprite and objects outside of the game engine. Specifically, RemoveSpriteOneWay will remove a Sprite from:

* Rendering
  * Ordered rendering
  * Z-Buffered rendering
  * Layered rendering
* Automatic engine updates

RemoveSpriteOneWay will not remove a Sprite from:

* Glue entities and other game-level [PositionedObjectLists](https://github.com/flatredball/FlatRedBallDocs/tree/main/frb/docs/index.php)
* Parent/child relationships

### Code Example

The following code will remove a Sprite from the SpriteManager, but will preserve any game-level relationships:

```
SpriteManager.RemoveSpriteOneWay(SpriteInstance);
```

### Example - Moving Entity Sprites to Layers

RemoveSpriteOneWay can be used to move a Sprite from an entity to a different layer. Keep in mind that if the entire entity should be moved from one entity to another, call [MoveToLayer](/flatredball/glue-reference/entities/movetolayer.md). However, to move an individual Sprite which is a part of an entity (such as a Sprite used to render glowing light), it needs to first be removed from the engine, then added to a different layer. The following code moves a Sprite which is part of a TorchInstance entity to a layer called LightLayer:

```lang:c#
SpriteManager.RemoveSpriteOneWay(TorchInstance.LightSprite);
SpriteManager.AddToLayer(TorchInstance.LightSprite, LightLayer);
```

Note that the code above assumes that LightSprite is publicly available. If the Sprite is part of a Glue entity, this can be made public in Glue by setting [HasPublicProperty](/flatredball/glue-reference/objects/glue-reference-haspublicproperty.md) to true.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flatredball.com/flatredball/api/flatredball/spritemanager/removespriteoneway.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
