Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
14 changes: 5 additions & 9 deletions docs/features/particles/loading_ember_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ Organize your files so that textures are either:
- In the same directory as the `.ember` file, or
- Already loaded through the Content Pipeline

### Step 2: Load Using ParticleEffectReader
### Step 2: Load Using ParticleEffectSerializer

Use the `ParticleEffectReader` class to load the effect directly:
Use the `ParticleEffectSerializer` class to load the effect directly:

```cs
public class Game1 : Game
Expand All @@ -159,11 +159,8 @@ public class Game1 : Game
{
// Load the particle effect directly from file
string effectPath = "Content/ParticleEffects/Smoke.ember";

using (ParticleEffectReader reader = new ParticleEffectReader(effectPath, Content))
{
_particleEffect = reader.ReadParticleEffect();
}

_particleEffect = ParticleEffectSerializer.Deserialize(effectPath, Content);

// Position the effect
_particleEffect.Position = new Vector2(400, 300);
Expand Down Expand Up @@ -197,8 +194,7 @@ You can also load from a stream for more advanced scenarios:
```cs
// Load using MonoGame's TitleContainer
using Stream stream = TitleContainer.OpenStream("Content/ParticleEffects/Smoke.ember");
using ParticleEffectReader reader = new ParticleEffectReader(stream, Content);
ParticleEffect effect = reader.ReadParticleEffect();
ParticleEffect effect = ParticleEffectSerializer.Deserialize(stream, Content);
```

### Direct Loading Considerations
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { themes as prismThemes } from 'prism-react-renderer';

const globalVariables = {
'mgeversion': '5.1.1'
'mgeversion': '5.2.0'
}

/** @type {import('@docusaurus/types').Config} */
Expand Down