From 03aefd7719d7edb32bd2df5f122caf5668cee3e6 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sat, 2 May 2026 12:36:46 +0200 Subject: [PATCH 01/22] Added the assets section --- en/manual/assets/archetypes.md | 38 ++++++ en/manual/assets/asset-bundles.md | 91 ++++++++++++++ en/manual/assets/asset-compilation.md | 38 ++++++ en/manual/assets/assets-in-code.md | 51 ++++++++ en/manual/assets/create-an-asset.md | 22 ++++ en/manual/assets/edit-an-asset.md | 36 ++++++ en/manual/assets/index.md | 19 +++ en/manual/assets/use-an-asset.md | 33 +++++ en/manual/engine/assets/asset-bundles.md | 113 ------------------ en/manual/engine/assets/asset-control.md | 40 ------- en/manual/engine/assets/index.md | 80 ------------- en/manual/engine/assets/media/26968245.png | 3 - en/manual/engine/assets/media/9503662.png | 3 - en/manual/engine/index.md | 3 +- .../project-packages/package-properties.md | 2 +- en/manual/glossary/index.md | 7 +- en/manual/toc.yml | 23 ++-- 17 files changed, 349 insertions(+), 253 deletions(-) create mode 100644 en/manual/assets/archetypes.md create mode 100644 en/manual/assets/asset-bundles.md create mode 100644 en/manual/assets/asset-compilation.md create mode 100644 en/manual/assets/assets-in-code.md create mode 100644 en/manual/assets/create-an-asset.md create mode 100644 en/manual/assets/edit-an-asset.md create mode 100644 en/manual/assets/index.md create mode 100644 en/manual/assets/use-an-asset.md delete mode 100644 en/manual/engine/assets/asset-bundles.md delete mode 100644 en/manual/engine/assets/asset-control.md delete mode 100644 en/manual/engine/assets/index.md delete mode 100644 en/manual/engine/assets/media/26968245.png delete mode 100644 en/manual/engine/assets/media/9503662.png diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md new file mode 100644 index 000000000..dfdbf0102 --- /dev/null +++ b/en/manual/assets/archetypes.md @@ -0,0 +1,38 @@ +# Archetypes + +Stride allows you to create variants of the same asset that only change a selected number of properties, while remaining synchronized with the base. + +TODO: IMAGE OR VISUALIZATION + +Here is some terminology to keep in mind: + +* **Archetype** - the original asset from which a different asset derives from. +* **Derived asset** - an asset that derives from a different asset (an archetype). + +## Creating a derived asset + +In the **Asset view** panel, right click on the asset you want to derive from and select **Create derived asset**. + +TODO: IMAGE + +**Game Studio** then creates a new derived asset which you can modify. + +## Overriding values + +When changing a property of a derived asset in the **Property grid**, it will be marked as an overridden. Overridden properties are slightly brighter and bolder. + +TODO: IMAGE + +Override properties will not be updated when they are changed on the archetype. + +## Reverting overrides + +In case you want to revert a property to use the same values as the archetype, right click on it in the **Property grid** and select **Reset to base value**. + +## Unlink from archetype + +If you want to turn a derived asset into a normal one (unlinking it from the archetype), in the **Asset view** right click on it and select **Clear archetype**. + +TODO: IMAGE + +The asset will now no longer follow changes done to the archetype. diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md new file mode 100644 index 000000000..177310869 --- /dev/null +++ b/en/manual/assets/asset-bundles.md @@ -0,0 +1,91 @@ +# Asset bundles + +When assets get compiled with the final game, they are turned into **asset bundles**. By default, only one asset bundle is created, but this can be changed to for example: split off DLC content into a separate bundle, so that it could be sold separately. + +When an application starts Stride only loads the `default` bundle. Other bundles need to be loaded through code. + +## Create an asset bundle + +> [!NOTE] +> Currently, this has to be done manually. + +TODO: TEST IF YOU CAN DO THIS IN BASE PROJECT PACKAGE AND NOT PLATFORM + +In order to create new asset bundles, you'll have to modify the `.sdpkg` file of a project package. For more information about project package properties visit [this page](../files-and-folders/project-packages/package-properties.md). + +Bundles are defined under the `Bundle` property. Each bundle has a `Name`, a list of `Dependencies` on other bundles and a list of `Selectors` that specify which assets belong to the bundle. + +There are 2 types of selectors: +* 🏷️ **Tag selector** - selects assets that have at least one of the specified tags in `Tags`. +* 📁 **Path selector** - selects assets based on the provided list of paths in `Paths`. Filters work similarly to the [`.gitignore` filtering convention](https://git-scm.com/docs/gitignore#_pattern_format) with a few exceptions: `!` (negate), `[]` (groups) and `#` (comments). This means that you can select **individual files**, **entire folders** or **files with a specific extension**. + +Here's an example showing how to create asset bundles: + +```yaml +Bundles: + - Name: CustomBundleA + Selectors: + - !TagSelector + Tags: + - MyTag1 + - MyTag2 + - Name: CustomBundleB + Dependencies: + - CustomBundleA + Selectors: + - !TagSelector + Tags: + - MyTag3 + - MyTag4 + - !PathSelector + Paths: + - folder1/ + - /folder2/ + - *.bin + - folder3/*.xml +``` + +### Root assets + +It's important to note that assets contained in custom asset bundles **shouldn't be referenced by the base game**, as Stride will fail to load them if their asset bundle is unavailable. However, doing this will result in Stride not compiling them in any bundle, due to seeing them as being unused. + +To make sure this doesn't happen, make sure to **mark the appropriate assets as root** (such as scene assets), to make it possible to load them through code. + +For more information about root assets, visit the [asset compilation page](asset-compilation.md). + +### Compiling behaviour + +When compiling, assets are placed in the most appropriate bundle. + +1. Assets not defined in `Bundles` are placed in the **default** bundle, which is loaded automatically +2. If an asset is needed by **BundleA** and **BundleB**, but **BundleB** has a dependency on **BundleA**, that asset is placed only in **BundleA** +3. If an asset is needed by **BundleA** and **BundleB** and both of them aren't dependent on each other, that asset is placed in both of them. + +TODO: VISUALIZATION + +> [!NOTE] +> Loading two bundles with the same asset won't result in a duplicate! + +TODO: CHECK ABOVE + +## Loading bundles + +Stride **automatically loads the default bundle**. However other bundles need to be manually loaded through code. + +```csharp +Content.DatabaseFileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); +``` + +TODO: CHECK IF THIS THROW AN ERROR IF THE BUNDLE ISN'T PRESENT + +Then, assets can be loaded via the **content system**. For more information, visit the [assets in code page](assets-in-code.md). + +## Bundle location + +Bundles are located in `data/db/bundles` next to the built executable. + +TODO: VISUALIZATION + +TODO: CHECK THE ACTUAL RESULT IF BUNDLES ARE CONTAINED IN MULTIPLE FILES + +TODO: CHECK IF YOU CAN REMOVE A BUNDLE WITHOUT STRIDE COMPLAINING diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md new file mode 100644 index 000000000..1e543cb08 --- /dev/null +++ b/en/manual/assets/asset-compilation.md @@ -0,0 +1,38 @@ +# Asset compilation + +Assets are compiled into **bundles**. + +## Which assets are compiled + +Stride only compiles assets which are used in the game. This means that if an asset is unreferenced by other assets that are needed by the game, they will be ignored and won't be available to load from code. + +TODO: VISUALIZATION + +## Blue, green and gray dots + +In the **Asset view** panel, you can see a dot in the top left corner that signifies how an asset will be compiled. + +TODO: IMAGE + +Each color represents something: + +* 🔵 **Blue** (will be compiled) - this asset is marked as root, meaning that it will always be compiled in the game no matter if it's referenced or not. +* 🟢 **Green** (will be compiled) - this asset is referenced by another asset that is used in the game, meaning that it will be compiled. +* ⚫ **Gray** (won't be compiled) - this asset isn't referenced by any other asset that's used in the game, meaning that it won't be compiled. + +## Root assets + +🔵 **Root assets** are assets that will always be compiled no matter if they are referenced or not. + +A few remarks: + +* Root assets are defined **per platform**. When marking as root, you have to make sure to do that for every platform your project is targeting. + TODO: CHECK THAT WHEN YOU MARK SOMETHING IT'S ONLY MARKED FOR THAT ONE PLATFORM +* TODO: CHECK IF YOU CAN ADD ROOT ASSETS TO THE MAIN GAME PROJECT PACKAGE +* You can only mark individual assets as root, not folders. + +### How to mark an asset as root + +You can mark an asset as root by right clicking on it in the **Asset view** panel and selecting **Mark as root**. + +TODO: IMAGE diff --git a/en/manual/assets/assets-in-code.md b/en/manual/assets/assets-in-code.md new file mode 100644 index 000000000..3aec5e132 --- /dev/null +++ b/en/manual/assets/assets-in-code.md @@ -0,0 +1,51 @@ +# Assets in code + +Assets can be loaded in code via the content system. + +## Url reference + +You can create an assignable reference to another asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. + +```csharp +public class Example : StartupScript +{ + public UrlReference MyAssetReference { get; set; } +} +``` + +It will show up in the **Property grid** like so: + +TODO: IMAGE + +For more information on how to assign an asset, visit the [use an asset page](use-an-asset.md). + +## Loading from path + +You can load assets at runtime through code [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync*). + +```csharp +public const string PATH_TO_ASSET = "path/to/asset"; + +public override void Start() +{ + var loadedModel = Content.Load(PATH_TO_ASSET); +} + +public override void Cancel() +{ + Content.Unload(PATH_TO_ASSET); +} +``` + +> [!WARNING] +> **Make sure to unload!** Content manager keeps loaded items in memory until the amount of `Unload` calls matches the amount of those for `Load`. +> +> TODO: VISUALIZATION +> +> This is why it's crucial to unload assets once your script is done with them. + +### Assets not loading + +The asset compiler only knows which assets to include based on their references. When loading assets from a path, we are not telling Stride that we need to use them. + +To fix that, you can [include the target assets as root](asset-compilation.md#how-to-mark-an-asset-as-root) to make sure they are always included with the build, or try using [url references](#url-reference) instead. diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md new file mode 100644 index 000000000..5d4a517b6 --- /dev/null +++ b/en/manual/assets/create-an-asset.md @@ -0,0 +1,22 @@ +# Create an asset + +Assets can be created with **Game Studio** in the **Asset view** panel. + +1. In the **Asset view** panel, click the **Add assets** button. + + TODO: IMAGE + +2. Select the type of asset you want to create. + +3. If the asset requires a resource, it will prompt you to select it from the resources folder or somewhere else on your computer. + + TODO: IMAGE + + If the resource isn't present in the resources folder, **Game Studio** will ask you if you want to move it there. In the majority of cases, **you will want to click yes**. + + TODO: IMAGE + +> [!TIP] +> You can also create an asset **by dragging and dropping a resource in the Asset view**. +> +> TODO: IMAGE diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md new file mode 100644 index 000000000..330928aeb --- /dev/null +++ b/en/manual/assets/edit-an-asset.md @@ -0,0 +1,36 @@ +# Edit an asset + +Assets can be edited in **Game Studio**. + +## Editing in Property grid + +When you select an asset in the **Asset view** panel, it's properties will show up in the **Property grid**. + +TODO: IMAGE + +You can modify them to your liking and your changes will be reflected in the **Asset preview** panel in real time. + +TODO: IMAGE + +Modified assets aren't automatically saved. You will have to save them manually by going to **File > Save** TODO CHECK THIS or by pressing a keyboard shortcut (Ctrl + S by default TODO check if shortcuts can be modified). + +## Editing using a dedicated editor + +Certain assets require the use of a dedicated editor. The most notable example of this are **Scenes**. + +Currently the assets that have a dedicated editor are: + +* Graphics compositor +* Prefabs +* Scenes +* Sprite sheets +* Ui pages +* Ui libraries +* Scripts +* TODO: CHECK ALL OF THIS + +To open a dedicated editor for an asset: + +* Double click it +* Right click and select **Edit asset** +* Select it and press **Ctrl + Enter** diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md new file mode 100644 index 000000000..c6a66d232 --- /dev/null +++ b/en/manual/assets/index.md @@ -0,0 +1,19 @@ +# Assets + +**Assets** are representations of elements in a project (such as scenes, textures or audio) which can be used by scripts or other assets. An example would be the **model component** using a **model asset**. + +**Resources** on the other hand are the files containing actual data, which can then be used by assets. + +In short: +* **Resources** are raw data files (`.png`, `.wav`, `.fbx`) +* **Assets** is what can be used in game. They can reference resource files and contain additional properties. + +## Location of assets and resources + +In **Game Studio** you can view assets in the **Asset view** panel by selecting an **Assets** folder in the **Solution explorer**. + +TODO: IMAGE + +As for **resources**, it isn't possible to view them in Game Studio. You can browse through them by opening the directory containing your project and going to a resource folder of the target [project package](../files-and-folders/project-packages/index.md). + +For more information, visit the [project file structure page](../files-and-folders/project-structure.md). diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md new file mode 100644 index 000000000..bc4f6e139 --- /dev/null +++ b/en/manual/assets/use-an-asset.md @@ -0,0 +1,33 @@ +# Use an asset + +Assets can be referenced by other assets or components in a scene. + +## Components and other assets + +In the **Property grid** you can sometimes find a property that looks like this: + +TODO: IMAGE + +In the above example, it's the **Model** property in the **model component**. + +This is where you can assign a reference to another asset. There are two available buttons: +* 👆 **Hand** - opens up a dialogue to select an existing asset. +* **Eraser** - clears the reference. + +> [!TIP] +> You can also **drag and drop** an asset from the **Asset view**. +> +> TODO: IMAGE + +## Your own scripts + +You can create an assignable reference to another asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. + +```csharp +public class Example : StartupScript +{ + public UrlReference MyAssetReference { get; set; } +} +``` + +For more information on how to use assets in your own code, visit the [assets in code page](assets-in-code.md). diff --git a/en/manual/engine/assets/asset-bundles.md b/en/manual/engine/assets/asset-bundles.md deleted file mode 100644 index 4b7d74c75..000000000 --- a/en/manual/engine/assets/asset-bundles.md +++ /dev/null @@ -1,113 +0,0 @@ -# Asset bundles - ->[!Warning] ->This section is out of date. For now, you should only use it for reference. - -A bundle of assets allows to package assets into a single archive that can be downloaded into the game at a specific time. - -It allows creation of **Downloadable Content (DLC)**. - -Basic rules: - -- A project can generate several bundle. -- A bundle is created from several **assets selectors** (Currently, only the `PathSelector` and `TagSelector` are supported) -- A bundle can have dependencies to others bundles -- Every bundle implicitly references `default` bundle, where every asset which shouldn't go in a specific bundle will be packaged -- Once a bundle is deployed into the game, all assets from this bundle and all its dependencies are accessible -- Bundle resolution is done through an asynchronous callback that allows you to download bundle, and will be called once per dependency (similar to AssemblyResolve event). - -# Create a bundle - -> [!Note] -> Creating currently requires some manual steps (i.e. editing `sdpkg` by hand). - -Open the `sdprj` file of the game executable and add the following configuration: - -Example: - -- A bundle named `MyBundleName` will embed assets with tags `MyTag1` and `MyTag2` -- A bundle named `MyBundleName2` will embed assets with tags `MyTag3` and `MyTag4`. This bundle has a dependency to `MyBundleName` -- There is also a `PathSelector` which follow the `.gitignore` filtering convention. - - - -```cs -Bundles: - - Name: MyBundleName - Selectors: - - !TagSelector - Tags: - - MyTag1 - - MyTag2 - - Name: MyBundleName2 - Dependencies: - - MyBundleName - Selectors: - - !TagSelector - Tags: - - MyTag3 - - MyTag4 - - !PathSelector - Paths: - - folder1/ - - /folder2/ - - *.bin - - folder3/*.xml -``` - - -> [!Note] -> -> Asset dependencies are automatically placed in the most appropriate bundle. -> -> Current process works that way: -> -> - Find assets that matches specific Tag Selectors ("roots" of bundle assets). -> - Enumerate assets that are dependent on those "roots" bundle assets and put them in the same bundle than their "roots" asset. -> - Except if already accessible through one of package dependencies (i.e. a shared dependent package or default package). -> - Place everything else in default bundle. -> -> Note that: -> -> - Shared assets might be duplicated if not specifically placed in common or default package, but that is intended (i.e. if user wishes to distribute 2 separate DLC that need common assets but need to be self-contained). -> - Every bundle implicitly depends on default bundle. -> -> - -# Load a bundle at runtime - -Loading bundle is done through `ObjectDatabase.LoadBundle(string bundleName) (ref:{Stride.Core.Storage.ObjectDatabase.LoadBundle})`: - -```cs -// Load bundle -Assets.DatabaseFileProvider.ObjectDatabase.LoadBundle("MyBundleName2"); - -// Load specified asset -var texture = Assets.Load("AssetContainedInMyBundleName2"); -``` - - -# Selectors - - Selectors help deciding which assets are stored in a specific bundle. - -## Tag selector - -Select assets based on a list of tag attached on each asset. - -Properties: - -- Tags: List of Tags. Any asset that contains at least one of the tag will be included. - -## Path selector - -Select assets based on their path. - -Standard .gitignore patterns are supported (except ! (negate), # (comments) and \[0-9\] (groups)). - -Properties: - -- Paths: List of filters. Any asset whose URL matches one of the filter will be included. - - - diff --git a/en/manual/engine/assets/asset-control.md b/en/manual/engine/assets/asset-control.md deleted file mode 100644 index 257d0ce70..000000000 --- a/en/manual/engine/assets/asset-control.md +++ /dev/null @@ -1,40 +0,0 @@ -# Asset control - ->[!Warning] ->This section is out of date. For now, you should only use it for reference. - -Until now, all assets of a game package, and its dependencies, were compiled as part of your game. - -Starting with 1.3, we compile only the assets required by your game. - -Don’t worry, most of it is done automatically for you! We do that by starting to collect dependencies from the new Game Setting asset: it references the Default Scene, and we can easily detect all the required asset references (Models, Materials, Asset referenced by your scripts and so on). - -In case you were loading anything in your script using Content.Load, you can still tag those assets specifically with “Mark as Root” in the editor. - -However, we now recommend to instead create a field in your script and fill it directly in the editor. All the samples have been updated to this new practice, so please check them out. - -## Which assets are compiled? - -Assets that will be compiled and packaged in your project are: - -- **Root assets (blue)** - - **Automatic** for a few asset types (i.e. Game Settings, Shaders) - - Explicit (using "**Mark as Root**" on the asset) -- **Dependencies of root assets (green)** - - Since Game Settings is collected, that means that Default Scene and all its dependencies will be compiled as well (includes Model, Script field members pointing to other assets, etc...) - - Also, we encourage our users to switch your script from Content.Load (which require "Mark as Root") to a field member that you can set within the editor using drag and drop. That will create an implicit dependency that will force that asset to be compiled as well. -- **Everything else (white)** (objects not marked as root and not referenced directly or indirectly by a root) **won't be packaged** - -![media/26968245.png](media/26968245.png) - -## "Mark as root" - -One important thing to understand is that "Mark as root" is not part of the asset, it is stored in the "current" package (the one that is in bold in the Solution Explorer). - -It means that if "MyGame" is current package, if you check "Mark as Root" on Silver Material (part of SharedPackage), this information will be stored in MyGame.sdpkg as part of the reference to SharedPackage. - -As a result, you can use a shared package from multiple games even if you have different explicit roots. - -## See also - -For additional information about asset management, see [Manage Assets](../../game-studio/manage-assets.md) \ No newline at end of file diff --git a/en/manual/engine/assets/index.md b/en/manual/engine/assets/index.md deleted file mode 100644 index 6de4eeaf6..000000000 --- a/en/manual/engine/assets/index.md +++ /dev/null @@ -1,80 +0,0 @@ -# Asset manager - ->[!Warning] ->This section is out of date. For now, you should only use it for reference. - -# Assets - -After creating your assets in Game Studio, @'Stride.Core.Serialization.Assets.AssetManager' is the class responsible for loading, unloading and saving assets. - -## Creating - -You usually create assets directly in Game Studio. - -Their URL will match the name (including folder) in Game Studio. - -Examples of URLs: - -- knight (user imports knight.fbx directly in main asset folder) -- level1/room1 (user creates level1 and import room1.fbx inside) - -For more information, see [Assets](../../game-studio/assets.md) for more details. - -## Loading - -Loading an asset should be done with the help of @'Stride.Core.Serialization.Assets.AssetManager' class: - -```cs -// Load an asset directly from a file: -var texture = Content.Load("texture1"); - -// Load a Scene asset -var scene = Content.Load("scenes/scene1"); - -// Load an Entity asset -var entity = Content.Load("entity1"); -``` - -Note that loading an asset that has already been loaded only increment the reference counter and do not reload the asset. - -## Unloading - -Unloading is also done using the AssetManager class: - -```cs - Asset.Unload(asset); -``` - - -## Asset life time - -Asset load and unload are working in pairs. For each call to 'load', a corresponding call to 'unload' is expected. - -An asset is actually loaded only during the first call to 'load'. All subsequent calls only result to an asset reference increment. - -An asset is actually unload only when the number of call to unload match the number of call the load. - -The @'Stride.Core.Serialization.Assets.AssetManager.Get' method returns the reference to a loaded asset but does not increment the asset reference counter. - -```cs - var firstReference = Content.Load("MyTexture"); // load the asset and increase the reference counter (ref count = 1) - -// the texture can be used here - -var secondReference = Content.Load("MyTexture"); // only increase the reference counter (ref count = 2) - -// the texture can still be used here - -Asset.Unload(firstReference); // decrease the reference counter (ref count = 1) - -// the texture can still be used here - -Asset.Get("MyTexture"); // return the loaded asset without increasing the reference counter (ref count = 1) - -// the texture can still be used here -Asset.Unload(secondReference); // decrease the reference counter and unload the asset (ref count = 0) - -// The texture has been unloaded, it cannot be used here any more. -``` - - diff --git a/en/manual/engine/assets/media/26968245.png b/en/manual/engine/assets/media/26968245.png deleted file mode 100644 index c6f9f128e..000000000 --- a/en/manual/engine/assets/media/26968245.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44f21c5d931bc482171c6ab44519c4495e03c31a20e5f372cb10b3c850ec4f4c -size 19444 diff --git a/en/manual/engine/assets/media/9503662.png b/en/manual/engine/assets/media/9503662.png deleted file mode 100644 index 77d3ab19d..000000000 --- a/en/manual/engine/assets/media/9503662.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:62aa56167a7bfd85c3618ecb0860854d83ceaebff2e8b181d24a84c92f9a1cfc -size 11021 diff --git a/en/manual/engine/index.md b/en/manual/engine/index.md index a50cb82c8..a8548337b 100644 --- a/en/manual/engine/index.md +++ b/en/manual/engine/index.md @@ -3,7 +3,6 @@ >[!Warning] >This section is out of date. For now, you should only use it for reference. -- [Asset](assets/index.md) - [Entity-component system](entity-component-system/index.md) - [File system](file-system.md) - [Build pipeline](build-pipeline.md) @@ -12,4 +11,4 @@ # See also - [Introduction to assets](../game-studio/assets.md) -- [Scripts](../scripts/index.md) \ No newline at end of file +- [Scripts](../scripts/index.md) diff --git a/en/manual/files-and-folders/project-packages/package-properties.md b/en/manual/files-and-folders/project-packages/package-properties.md index 8bd96e6e4..d248285cf 100644 --- a/en/manual/files-and-folders/project-packages/package-properties.md +++ b/en/manual/files-and-folders/project-packages/package-properties.md @@ -14,7 +14,7 @@ Every project package contains it's own set of properties, that can be customize | ResourceFolders | List of directory paths that contain resources. | | OutputGroupDirectories | A dictionary containing a custom output directory for each specified bundle name. | | ExplicitFolders (currently broken) | List of directory paths that are meant to always be loaded by **Game Studio**, even if they do not contain any assets. | -| Bundles | List of bundles and their metadata. For more information read [Asset Bundles](../../engine/assets/asset-bundles.md). | +| Bundles | List of bundles and their metadata. For more information read [Asset Bundles](../../assets/asset-bundles.md). | | TemplateFolders | List of directory paths containing custom templates in the `.sdtpl` format. For more information read [Custom Assets](../../scripts/custom-assets.md#adding-a-section-for-the-add-asset-menu-inside-the-editor). | | RootAssets | List of root assets (assets that will always be included with the build). | diff --git a/en/manual/glossary/index.md b/en/manual/glossary/index.md index 1193d74ca..47aeb1f5a 100644 --- a/en/manual/glossary/index.md +++ b/en/manual/glossary/index.md @@ -25,11 +25,10 @@ - [Archetype](../game-studio/archetypes.md): A template for asset properties that other assets can inherit from. - [Asset](../game-studio/assets.md): Content used by the game (models, textures, materials, scripts, etc.) managed by the asset pipeline. - Asset URL: The path used in code to load an asset, for example with `Content.Load("MyFolder/MyAsset")`. See [Create a model from code](../scripts/create-a-model-from-code.md) and [Create a script](../scripts/create-a-script.md). -- [Asset bundles](../engine/assets/asset-bundles.md): Groups of assets packaged for deployment/streaming. -- [Asset control](../engine/assets/asset-control.md): Control asset loading, references, and lifetime. -- [Build pipeline](../engine/build-pipeline.md): Compiles assets into runtime-ready formats. +- [Asset compilation](../assets/asset-compilation.md): Compiles assets into runtime-ready formats. +- [Asset bundles](../assets/asset-bundles.md): Groups of assets packaged for deployment/streaming. - [Prefab](../game-studio/prefabs/index.md): A reusable entity hierarchy that can be instantiated at design time or runtime. -- Root asset: An asset included in the build so it is available at runtime. See [Manage assets](../game-studio/manage-assets.md). +- [Root asset](../assets/asset-compilation.md#root-assets): An asset included in the build so it is available at runtime. ## Audio terms diff --git a/en/manual/toc.yml b/en/manual/toc.yml index 15a981155..2acc92a36 100644 --- a/en/manual/toc.yml +++ b/en/manual/toc.yml @@ -60,6 +60,22 @@ items: - name: Custom attributes href: animation/custom-attributes.md + - name: Assets + href: assets/index.md + items: + - name: Create an asset + href: assets/create-an-asset.md + - name: Edit an asset + href: assets/edit-an-asset.md + - name: Use an asset + href: assets/use-an-asset.md + - name: Assets in code + href: assets/assets-in-code.md + - name: Asset compilation + href: assets/asset-compilation.md + - name: Asset bundles + href: assets/asset-bundles.md + - name: Audio href: audio/index.md items: @@ -92,13 +108,6 @@ items: - name: Engine href: engine/index.md items: - - name: Assets - href: engine/assets/index.md - items: - - name: Asset bundles - href: engine/assets/asset-bundles.md - - name: Asset control - href: engine/assets/asset-control.md - name: ECS (Entity Component System) href: engine/entity-component-system/index.md items: From e326195ca0808f59433a29d760b5e2a8cc07d1ee Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sun, 3 May 2026 12:21:51 +0200 Subject: [PATCH 02/22] Fixup --- en/manual/assets/assets-in-code.md | 2 +- en/manual/assets/create-an-asset.md | 7 +++++++ en/manual/assets/index.md | 10 ++++++++++ en/manual/toc.yml | 4 +++- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/en/manual/assets/assets-in-code.md b/en/manual/assets/assets-in-code.md index 3aec5e132..9699b3e4d 100644 --- a/en/manual/assets/assets-in-code.md +++ b/en/manual/assets/assets-in-code.md @@ -1,6 +1,6 @@ # Assets in code -Assets can be loaded in code via the content system. +This page explains how to use assets in code. ## Url reference diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index 5d4a517b6..242b18bf6 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -8,6 +8,8 @@ Assets can be created with **Game Studio** in the **Asset view** panel. 2. Select the type of asset you want to create. + TODO: IMAGE + 3. If the asset requires a resource, it will prompt you to select it from the resources folder or somewhere else on your computer. TODO: IMAGE @@ -20,3 +22,8 @@ Assets can be created with **Game Studio** in the **Asset view** panel. > You can also create an asset **by dragging and dropping a resource in the Asset view**. > > TODO: IMAGE + +## See also +* [Edit an asset](edit-an-asset.md) +* [Use an asset](use-an-asset.md) +* [Assets in code](assets in code.md) diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index c6a66d232..8ae16bfec 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -17,3 +17,13 @@ TODO: IMAGE As for **resources**, it isn't possible to view them in Game Studio. You can browse through them by opening the directory containing your project and going to a resource folder of the target [project package](../files-and-folders/project-packages/index.md). For more information, visit the [project file structure page](../files-and-folders/project-structure.md). + +## In this section + +* [Create an asset](create-an-asset.md) +* [Edit an asset](edit-an-asset.md) +* [Use an asset](use-an-asset.md) +* [Assets in code](assets-in-code.md) +* [Archetypes](archetypes.md) +* [Asset compilation](asset-compilation.md) +* [Asset bundles](asset-bundles.md) diff --git a/en/manual/toc.yml b/en/manual/toc.yml index 2acc92a36..6023bca62 100644 --- a/en/manual/toc.yml +++ b/en/manual/toc.yml @@ -69,8 +69,10 @@ items: href: assets/edit-an-asset.md - name: Use an asset href: assets/use-an-asset.md - - name: Assets in code + - name: Use an asset in code href: assets/assets-in-code.md + - name: Archetypes + href: assets/archetypes.md - name: Asset compilation href: assets/asset-compilation.md - name: Asset bundles From 194cb15f2595857127037818e80cb44d1bb58bd3 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Tue, 5 May 2026 13:50:02 +0200 Subject: [PATCH 03/22] A lot of changes --- en/manual/assets/archetypes.md | 12 ++++++--- en/manual/assets/asset-bundles.md | 33 +++++++++++++---------- en/manual/assets/asset-compilation.md | 38 ++++++++++++++++++++++++--- en/manual/assets/assets-in-code.md | 13 ++++++++- en/manual/assets/create-an-asset.md | 19 +++++++++++--- en/manual/assets/edit-an-asset.md | 9 +++++-- en/manual/assets/index.md | 2 +- en/manual/assets/use-an-asset.md | 7 +++-- 8 files changed, 101 insertions(+), 32 deletions(-) diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md index dfdbf0102..22f8f4e2e 100644 --- a/en/manual/assets/archetypes.md +++ b/en/manual/assets/archetypes.md @@ -11,7 +11,7 @@ Here is some terminology to keep in mind: ## Creating a derived asset -In the **Asset view** panel, right click on the asset you want to derive from and select **Create derived asset**. +In the **asset view** panel, right click on the asset you want to derive from and select **Create derived asset**. TODO: IMAGE @@ -19,7 +19,7 @@ TODO: IMAGE ## Overriding values -When changing a property of a derived asset in the **Property grid**, it will be marked as an overridden. Overridden properties are slightly brighter and bolder. +When changing a property of a derived asset in the **property grid**, it will be marked as an overridden. Overridden properties are slightly brighter and bolder. TODO: IMAGE @@ -27,12 +27,16 @@ Override properties will not be updated when they are changed on the archetype. ## Reverting overrides -In case you want to revert a property to use the same values as the archetype, right click on it in the **Property grid** and select **Reset to base value**. +In case you want to revert a property to use the same values as the archetype, right click on it in the **property grid** and select **Reset to base value**. ## Unlink from archetype -If you want to turn a derived asset into a normal one (unlinking it from the archetype), in the **Asset view** right click on it and select **Clear archetype**. +If you want to turn a derived asset into a normal one (unlinking it from the archetype), in the **asset view** right click on it and select **Clear archetype**. TODO: IMAGE The asset will now no longer follow changes done to the archetype. + +## See also + +* [Create an asset](create-an-asset.md) diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index 177310869..c38962360 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -2,15 +2,13 @@ When assets get compiled with the final game, they are turned into **asset bundles**. By default, only one asset bundle is created, but this can be changed to for example: split off DLC content into a separate bundle, so that it could be sold separately. -When an application starts Stride only loads the `default` bundle. Other bundles need to be loaded through code. +When an application starts, Stride only loads the `default` bundle. Other bundles need to be loaded manually through code. ## Create an asset bundle > [!NOTE] > Currently, this has to be done manually. -TODO: TEST IF YOU CAN DO THIS IN BASE PROJECT PACKAGE AND NOT PLATFORM - In order to create new asset bundles, you'll have to modify the `.sdpkg` file of a project package. For more information about project package properties visit [this page](../files-and-folders/project-packages/package-properties.md). Bundles are defined under the `Bundle` property. Each bundle has a `Name`, a list of `Dependencies` on other bundles and a list of `Selectors` that specify which assets belong to the bundle. @@ -19,7 +17,7 @@ There are 2 types of selectors: * 🏷️ **Tag selector** - selects assets that have at least one of the specified tags in `Tags`. * 📁 **Path selector** - selects assets based on the provided list of paths in `Paths`. Filters work similarly to the [`.gitignore` filtering convention](https://git-scm.com/docs/gitignore#_pattern_format) with a few exceptions: `!` (negate), `[]` (groups) and `#` (comments). This means that you can select **individual files**, **entire folders** or **files with a specific extension**. -Here's an example showing how to create asset bundles: +Here's an example configuration: ```yaml Bundles: @@ -45,6 +43,9 @@ Bundles: - folder3/*.xml ``` +> [!WARNING] +> Currently if any of your custom bundles is **empty**, Stride will **fail to build** your game. + ### Root assets It's important to note that assets contained in custom asset bundles **shouldn't be referenced by the base game**, as Stride will fail to load them if their asset bundle is unavailable. However, doing this will result in Stride not compiling them in any bundle, due to seeing them as being unused. @@ -58,8 +59,8 @@ For more information about root assets, visit the [asset compilation page](asset When compiling, assets are placed in the most appropriate bundle. 1. Assets not defined in `Bundles` are placed in the **default** bundle, which is loaded automatically -2. If an asset is needed by **BundleA** and **BundleB**, but **BundleB** has a dependency on **BundleA**, that asset is placed only in **BundleA** -3. If an asset is needed by **BundleA** and **BundleB** and both of them aren't dependent on each other, that asset is placed in both of them. +2. If an asset is selected by **BundleA** and **BundleB**, but **BundleB** has a dependency on **BundleA**, that asset is placed only in **BundleA** +3. If an asset is selected by **BundleA** and **BundleB** and both of them aren't dependent on each other, that asset is placed in both of them. TODO: VISUALIZATION @@ -70,22 +71,26 @@ TODO: CHECK ABOVE ## Loading bundles -Stride **automatically loads the default bundle**. However other bundles need to be manually loaded through code. +Stride **automatically loads the default bundle**. However, other bundles need to be manually loaded through code. ```csharp -Content.DatabaseFileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); +Content.FileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); ``` -TODO: CHECK IF THIS THROW AN ERROR IF THE BUNDLE ISN'T PRESENT - -Then, assets can be loaded via the **content system**. For more information, visit the [assets in code page](assets-in-code.md). +Assets can then be loaded via the **content system**. For more information, visit the [assets in code page](assets-in-code.md). ## Bundle location -Bundles are located in `data/db/bundles` next to the built executable. +Bundles are located in `data/db/bundles` next to the built executable. You can recognize them by their name. TODO: VISUALIZATION -TODO: CHECK THE ACTUAL RESULT IF BUNDLES ARE CONTAINED IN MULTIPLE FILES +> [!NOTE] +> Bundles tend to be split into multiple files that start with the same name. +> +> TODO: VISUALIZATION (WHY NOT) + +## See also -TODO: CHECK IF YOU CAN REMOVE A BUNDLE WITHOUT STRIDE COMPLAINING +* [Asset compilation](asset-compilation.md) +* [Assets in code](assets-in-code.md) diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index 1e543cb08..714b122f6 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -26,13 +26,43 @@ Each color represents something: A few remarks: -* Root assets are defined **per platform**. When marking as root, you have to make sure to do that for every platform your project is targeting. - TODO: CHECK THAT WHEN YOU MARK SOMETHING IT'S ONLY MARKED FOR THAT ONE PLATFORM -* TODO: CHECK IF YOU CAN ADD ROOT ASSETS TO THE MAIN GAME PROJECT PACKAGE +* Root assets can be defined in any project package (TODO: CHECK THIS). * You can only mark individual assets as root, not folders. ### How to mark an asset as root -You can mark an asset as root by right clicking on it in the **Asset view** panel and selecting **Mark as root**. +You can mark an asset as root by right clicking on it in the **Asset view** panel and selecting **🔵 Mark as root**. TODO: IMAGE + +> [!WARNING] +> Marking an asset as root in **Game Studio** will only mark it **for the selected platform**. Make sure to either: +> * Mark the asset as root for every platform your project targets +> * Edit the main project package `.sdpkg` manually. For more information, visit the [package properties page](../files-and-folders/project-packages/package-properties.md). + +## Checking assets + +You can use [`Content.FileProvider.ContentIndexMap`](xref:Stride.Core.Serialization.Contents.IContentIndexMap) to check what assets are available. + +```csharp +if (Content.FileProvider.ContentIndexMap.Contains("Models/Enemy")) +{ + // Execute code if the asset exists +} + +var allContent = Content.FileProvider.ContentIndexMap.GetMergedIdMap() + .Select(x => x.Key); +``` + +> [!NOTE] +> The content system also contains shaders and shader information. If you want to use [`GetMergedIdMap`](xref:Stride.Core.Serialization.Contents.IContentIndexMap.GetMergedIdMap) to check which assets are loaded, consider filtering out paths that start with `shaders/` and `__shaders_bytecode__/`. +> +> ```csharp +> var allAssets = Content.FileProvider.ContentIndexMap.GetMergedIdMap() +> .Select(x => x.Key) +> .Where(x => !x.StartsWith("shaders/") && !x.StartsWith("__shaders_bytecode__/")); +> ``` + +## See also + +* [Assets in code](assets-in-code.md) diff --git a/en/manual/assets/assets-in-code.md b/en/manual/assets/assets-in-code.md index 9699b3e4d..f06180b3a 100644 --- a/en/manual/assets/assets-in-code.md +++ b/en/manual/assets/assets-in-code.md @@ -4,7 +4,7 @@ This page explains how to use assets in code. ## Url reference -You can create an assignable reference to another asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. +You can create an assignable reference to an asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. ```csharp public class Example : StartupScript @@ -17,6 +17,12 @@ It will show up in the **Property grid** like so: TODO: IMAGE +You can retrieve the asset through code by using **content system** using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*). + +```csharp +var asset = Content.Load(MyAssetReference); +``` + For more information on how to assign an asset, visit the [use an asset page](use-an-asset.md). ## Loading from path @@ -49,3 +55,8 @@ public override void Cancel() The asset compiler only knows which assets to include based on their references. When loading assets from a path, we are not telling Stride that we need to use them. To fix that, you can [include the target assets as root](asset-compilation.md#how-to-mark-an-asset-as-root) to make sure they are always included with the build, or try using [url references](#url-reference) instead. + +## See also + +* [Use an asset](use-an-asset.md) +* [Asset compilation](asset-compilation.md) diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index 242b18bf6..b3291ea2d 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -2,6 +2,8 @@ Assets can be created with **Game Studio** in the **Asset view** panel. +## Create an asset + 1. In the **Asset view** panel, click the **Add assets** button. TODO: IMAGE @@ -18,10 +20,19 @@ Assets can be created with **Game Studio** in the **Asset view** panel. TODO: IMAGE -> [!TIP] -> You can also create an asset **by dragging and dropping a resource in the Asset view**. -> -> TODO: IMAGE +## Create an asset from resource + +To create an asset from a resource, simply drag and drop it into the **Asset view** panel and select the type of resource you want to create. + +TODO: IMAGE + +You will be asked, if you want to **copy the dragged file to the resources folder**. Most of the time, **you want to do this**, in order to make the project easier to share and use version control with. + +TODO: IMAGE + +Finally, you will be asked if you want to **move it to the default location**. Again, most of the time **you want to do this**, unless you need more control over where resources end up. + +TODO: IMAGE ## See also * [Edit an asset](edit-an-asset.md) diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 330928aeb..0ad1ec62e 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -4,11 +4,11 @@ Assets can be edited in **Game Studio**. ## Editing in Property grid -When you select an asset in the **Asset view** panel, it's properties will show up in the **Property grid**. +When you select an asset in the **asset view** panel, it's properties will show up in the **property grid**. TODO: IMAGE -You can modify them to your liking and your changes will be reflected in the **Asset preview** panel in real time. +You can modify them to your liking and your changes will be reflected in the **asset preview** panel in real time. TODO: IMAGE @@ -34,3 +34,8 @@ To open a dedicated editor for an asset: * Double click it * Right click and select **Edit asset** * Select it and press **Ctrl + Enter** + +# See also + +* [Use an asset](use-an-asset.md) +* [Assets in code](assets-in-code.md) diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index 8ae16bfec..b25fa9d2d 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -10,7 +10,7 @@ In short: ## Location of assets and resources -In **Game Studio** you can view assets in the **Asset view** panel by selecting an **Assets** folder in the **Solution explorer**. +In **Game Studio** you can view assets in the **asset view** panel by selecting an **assets** folder in the **solution explorer**. TODO: IMAGE diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index bc4f6e139..a4983e66f 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -8,8 +8,6 @@ In the **Property grid** you can sometimes find a property that looks like this: TODO: IMAGE -In the above example, it's the **Model** property in the **model component**. - This is where you can assign a reference to another asset. There are two available buttons: * 👆 **Hand** - opens up a dialogue to select an existing asset. * **Eraser** - clears the reference. @@ -31,3 +29,8 @@ public class Example : StartupScript ``` For more information on how to use assets in your own code, visit the [assets in code page](assets-in-code.md). + +## See also + +* [Assets in code](assets-in-code.md) +* [Asset compilation](asset-compilation.md) From 5ea423819132c591605b273116ff48ff640170b5 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Wed, 6 May 2026 09:45:01 +0200 Subject: [PATCH 04/22] Many improvements --- en/manual/assets/archetypes.md | 2 +- en/manual/assets/asset-bundles.md | 4 +- en/manual/assets/asset-compilation.md | 6 +- en/manual/assets/assets-in-code.md | 62 ----------------- en/manual/assets/create-an-asset.md | 8 +-- en/manual/assets/edit-an-asset.md | 8 +-- en/manual/assets/index.md | 6 +- en/manual/assets/use-an-asset-in-code.md | 87 ++++++++++++++++++++++++ en/manual/assets/use-an-asset.md | 19 +----- en/manual/toc.yml | 2 +- 10 files changed, 108 insertions(+), 96 deletions(-) delete mode 100644 en/manual/assets/assets-in-code.md create mode 100644 en/manual/assets/use-an-asset-in-code.md diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md index 22f8f4e2e..716de280f 100644 --- a/en/manual/assets/archetypes.md +++ b/en/manual/assets/archetypes.md @@ -11,7 +11,7 @@ Here is some terminology to keep in mind: ## Creating a derived asset -In the **asset view** panel, right click on the asset you want to derive from and select **Create derived asset**. +In the **asset view**, right click on the asset you want to derive from and select **Create derived asset**. TODO: IMAGE diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index c38962360..915ab7d2c 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -77,7 +77,7 @@ Stride **automatically loads the default bundle**. However, other bundles need t Content.FileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); ``` -Assets can then be loaded via the **content system**. For more information, visit the [assets in code page](assets-in-code.md). +Assets can then be loaded via the **content system**. For more information, visit the [use an asset in code page](use-an-asset-in-code.md). ## Bundle location @@ -93,4 +93,4 @@ TODO: VISUALIZATION ## See also * [Asset compilation](asset-compilation.md) -* [Assets in code](assets-in-code.md) +* [Use an asset in code](use-an-asset-in-code.md) diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index 714b122f6..f52ddbd94 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -10,7 +10,7 @@ TODO: VISUALIZATION ## Blue, green and gray dots -In the **Asset view** panel, you can see a dot in the top left corner that signifies how an asset will be compiled. +In the **asset view**, you can see a dot in the top left corner that signifies how an asset will be compiled. TODO: IMAGE @@ -31,7 +31,7 @@ A few remarks: ### How to mark an asset as root -You can mark an asset as root by right clicking on it in the **Asset view** panel and selecting **🔵 Mark as root**. +You can mark an asset as root by right clicking on it in the **asset view** and selecting **🔵 Mark as root**. TODO: IMAGE @@ -65,4 +65,4 @@ var allContent = Content.FileProvider.ContentIndexMap.GetMergedIdMap() ## See also -* [Assets in code](assets-in-code.md) +* [Use an asset in code](use-an-asset-in-code.md) diff --git a/en/manual/assets/assets-in-code.md b/en/manual/assets/assets-in-code.md deleted file mode 100644 index f06180b3a..000000000 --- a/en/manual/assets/assets-in-code.md +++ /dev/null @@ -1,62 +0,0 @@ -# Assets in code - -This page explains how to use assets in code. - -## Url reference - -You can create an assignable reference to an asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. - -```csharp -public class Example : StartupScript -{ - public UrlReference MyAssetReference { get; set; } -} -``` - -It will show up in the **Property grid** like so: - -TODO: IMAGE - -You can retrieve the asset through code by using **content system** using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*). - -```csharp -var asset = Content.Load(MyAssetReference); -``` - -For more information on how to assign an asset, visit the [use an asset page](use-an-asset.md). - -## Loading from path - -You can load assets at runtime through code [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync*). - -```csharp -public const string PATH_TO_ASSET = "path/to/asset"; - -public override void Start() -{ - var loadedModel = Content.Load(PATH_TO_ASSET); -} - -public override void Cancel() -{ - Content.Unload(PATH_TO_ASSET); -} -``` - -> [!WARNING] -> **Make sure to unload!** Content manager keeps loaded items in memory until the amount of `Unload` calls matches the amount of those for `Load`. -> -> TODO: VISUALIZATION -> -> This is why it's crucial to unload assets once your script is done with them. - -### Assets not loading - -The asset compiler only knows which assets to include based on their references. When loading assets from a path, we are not telling Stride that we need to use them. - -To fix that, you can [include the target assets as root](asset-compilation.md#how-to-mark-an-asset-as-root) to make sure they are always included with the build, or try using [url references](#url-reference) instead. - -## See also - -* [Use an asset](use-an-asset.md) -* [Asset compilation](asset-compilation.md) diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index b3291ea2d..f924c55ef 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -1,10 +1,10 @@ # Create an asset -Assets can be created with **Game Studio** in the **Asset view** panel. +Assets can be created with **Game Studio** in the **asset view**. ## Create an asset -1. In the **Asset view** panel, click the **Add assets** button. +1. In the **asset view**, click the **Add assets** button. TODO: IMAGE @@ -22,7 +22,7 @@ Assets can be created with **Game Studio** in the **Asset view** panel. ## Create an asset from resource -To create an asset from a resource, simply drag and drop it into the **Asset view** panel and select the type of resource you want to create. +To create an asset from a resource, simply drag and drop it into the **asset view** and select the type of resource you want to create. TODO: IMAGE @@ -37,4 +37,4 @@ TODO: IMAGE ## See also * [Edit an asset](edit-an-asset.md) * [Use an asset](use-an-asset.md) -* [Assets in code](assets in code.md) +* [Use an asset in code](use-an-asset-in-code.md) diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 0ad1ec62e..7794fc1f7 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -2,13 +2,13 @@ Assets can be edited in **Game Studio**. -## Editing in Property grid +## Editing in property grid -When you select an asset in the **asset view** panel, it's properties will show up in the **property grid**. +When you select an asset in the **asset view**, it's properties will show up in the **property grid**. TODO: IMAGE -You can modify them to your liking and your changes will be reflected in the **asset preview** panel in real time. +Your changes will be reflected in the **asset preview** in real time. TODO: IMAGE @@ -38,4 +38,4 @@ To open a dedicated editor for an asset: # See also * [Use an asset](use-an-asset.md) -* [Assets in code](assets-in-code.md) +* [Use an asset in code](use-an-asset-in-code.md) diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index b25fa9d2d..76f356869 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -10,11 +10,11 @@ In short: ## Location of assets and resources -In **Game Studio** you can view assets in the **asset view** panel by selecting an **assets** folder in the **solution explorer**. +In **Game Studio** you can view assets in the **asset view** by selecting an **assets** folder in the **solution explorer**. TODO: IMAGE -As for **resources**, it isn't possible to view them in Game Studio. You can browse through them by opening the directory containing your project and going to a resource folder of the target [project package](../files-and-folders/project-packages/index.md). +As for **resources**, it isn't possible to view them in **Game Studio**. You can browse through them by opening the directory containing your project and going to a resource folder of the target [project package](../files-and-folders/project-packages/index.md). For more information, visit the [project file structure page](../files-and-folders/project-structure.md). @@ -23,7 +23,7 @@ For more information, visit the [project file structure page](../files-and-folde * [Create an asset](create-an-asset.md) * [Edit an asset](edit-an-asset.md) * [Use an asset](use-an-asset.md) -* [Assets in code](assets-in-code.md) +* [Use an asset in code](use-an-asset-in-code.md) * [Archetypes](archetypes.md) * [Asset compilation](asset-compilation.md) * [Asset bundles](asset-bundles.md) diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md new file mode 100644 index 000000000..993d3b05b --- /dev/null +++ b/en/manual/assets/use-an-asset-in-code.md @@ -0,0 +1,87 @@ +# Use an asset in code + +There are a few ways of using assets in code: + +* [**Referencing**](#referencing-an-asset) - the easiest way, creates an assignable reference in the **property grid**. +* [**Loading from path**](#loading-from-path) - a manual way of loading assets based on their path. You also have to make sure the assets are included in the build and to unload them when you're done using them. +* [**Url reference**](#url-reference) - a mix between referencing and loading from path. It creates an assignable reference in the **property grid**, while allowing you to manually handle loading and unloading. + +## Referencing an asset + +The easiest way of using an asset in your own script is to create a assignable reference using a public property or field. + +```csharp +public class Example : StartupScript +{ + public Model ModelAsset { get; set; } +} +``` + +The above will show up in the **property grid** like so: + +TODO: IMAGE + +Stride will then automatically handle assigning and manage the reference count. However, if you want more control, consider using a [url reference](#url-reference) instead. + +## Loading from path + +> [!WARNING] +> When assets are loaded manually, **they have to be manually unloaded too**, or else Stride will keep the assets **loaded in memory forever**. + +You can load assets at runtime through code using [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) and then unload them using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). + +```csharp +public override void Start() +{ + var loadedModel = Content.Load("path/to/asset"); +} + +public override void Cancel() +{ + Content.Unload("path/to/asset"); +} +``` + +### Missing assets + +The asset compiler only knows which assets to include based on their references. When loading assets only from a path, **Stride doesn't know that the asset is needed in the build**. + +To fix that, you can [include the missing assets as root](asset-compilation.md#how-to-mark-an-asset-as-root) to make sure they are always included with the build, or try using [url references](#url-reference) instead. + +## Url reference + +Url references provide a way of assigning an asset in the property grid **without loading it**. + +Unlike [loading from path](#loading-from-path), the references asset will be included in the build, as Stride will see it as needed by the component. + +You can create an assignable url reference to an asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. + +```csharp +public class Example : StartupScript +{ + public UrlReference MyAssetReference { get; set; } +} +``` + +It will show up in the **property grid** like so: + +TODO: IMAGE + +You can retrieve the asset through code via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). + +```csharp +public override void Start() +{ + var asset = Content.Load(MyAssetReference); +} + +public override void Cancel() +{ + var asset = Content.Unload(MyAssetReference); +} +``` + +## See also + +* [Use an asset](use-an-asset.md) +* [Asset compilation](asset-compilation.md) diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index a4983e66f..e81801270 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -4,7 +4,7 @@ Assets can be referenced by other assets or components in a scene. ## Components and other assets -In the **Property grid** you can sometimes find a property that looks like this: +In the **property grid** you can sometimes find a property that looks like this: TODO: IMAGE @@ -13,24 +13,11 @@ This is where you can assign a reference to another asset. There are two availab * **Eraser** - clears the reference. > [!TIP] -> You can also **drag and drop** an asset from the **Asset view**. +> You can also **drag and drop** an asset from the **asset view**. > > TODO: IMAGE -## Your own scripts - -You can create an assignable reference to another asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. - -```csharp -public class Example : StartupScript -{ - public UrlReference MyAssetReference { get; set; } -} -``` - -For more information on how to use assets in your own code, visit the [assets in code page](assets-in-code.md). - ## See also -* [Assets in code](assets-in-code.md) +* [Use an asset in code](use-an-asset-in-code.md) * [Asset compilation](asset-compilation.md) diff --git a/en/manual/toc.yml b/en/manual/toc.yml index 6023bca62..de3356e9e 100644 --- a/en/manual/toc.yml +++ b/en/manual/toc.yml @@ -70,7 +70,7 @@ items: - name: Use an asset href: assets/use-an-asset.md - name: Use an asset in code - href: assets/assets-in-code.md + href: assets/use-an-asset-in-code.md - name: Archetypes href: assets/archetypes.md - name: Asset compilation From e182aed97e29b843b4879a2f12e93161b484eb43 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Thu, 7 May 2026 07:48:06 +0200 Subject: [PATCH 05/22] Improvements to asset-bundles.md --- en/manual/assets/asset-bundles.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index 915ab7d2c..b1ab979f0 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -1,8 +1,8 @@ # Asset bundles -When assets get compiled with the final game, they are turned into **asset bundles**. By default, only one asset bundle is created, but this can be changed to for example: split off DLC content into a separate bundle, so that it could be sold separately. +After compilation, assets are turned into **asset bundles**. By default, only one asset bundle is created, but this can be changed in order to, for example: separate DLC content into it's own bundle, so that it could be sold separately. -When an application starts, Stride only loads the `default` bundle. Other bundles need to be loaded manually through code. +When the game starts, Stride only loads the `default` bundle. Other bundles need to be loaded manually through code. ## Create an asset bundle @@ -14,8 +14,8 @@ In order to create new asset bundles, you'll have to modify the `.sdpkg` file of Bundles are defined under the `Bundle` property. Each bundle has a `Name`, a list of `Dependencies` on other bundles and a list of `Selectors` that specify which assets belong to the bundle. There are 2 types of selectors: -* 🏷️ **Tag selector** - selects assets that have at least one of the specified tags in `Tags`. -* 📁 **Path selector** - selects assets based on the provided list of paths in `Paths`. Filters work similarly to the [`.gitignore` filtering convention](https://git-scm.com/docs/gitignore#_pattern_format) with a few exceptions: `!` (negate), `[]` (groups) and `#` (comments). This means that you can select **individual files**, **entire folders** or **files with a specific extension**. +* 🏷️ **Tag selector** - selects assets that have at least one of the specified `Tags`. +* 📁 **Path selector** - selects assets based on the provided list of `Paths`. Filters work similarly to the [`.gitignore` filtering convention](https://git-scm.com/docs/gitignore#_pattern_format) with a few exceptions: `!` (negations), `[]` (groups) and `#` (comments). This means that you can select **individual files**, **entire folders** or **files with a specific extension**. Here's an example configuration: @@ -39,27 +39,27 @@ Bundles: Paths: - folder1/ - /folder2/ - - *.bin - - folder3/*.xml + - *.sdtex + - folder3/*.sdscene ``` -> [!WARNING] -> Currently if any of your custom bundles is **empty**, Stride will **fail to build** your game. +> [!CAUTION] +> If any of your custom bundles are **empty**, Stride will **fail to build** the game. ### Root assets -It's important to note that assets contained in custom asset bundles **shouldn't be referenced by the base game**, as Stride will fail to load them if their asset bundle is unavailable. However, doing this will result in Stride not compiling them in any bundle, due to seeing them as being unused. +It's important to note that assets from optional bundles (such as DLC content) **shouldn't be referenced by assets from the default bundle**. If the other bundle is missing, Stride will fail when trying to load it's assets. -To make sure this doesn't happen, make sure to **mark the appropriate assets as root** (such as scene assets), to make it possible to load them through code. +However, if a bundle's assets are unreferenced, Stride will not compile them. To prevent this, make sure to **mark the appropriate assets (such as scenes) as root**. This will allow you to access the bundle's assets in code. For more information about root assets, visit the [asset compilation page](asset-compilation.md). ### Compiling behaviour -When compiling, assets are placed in the most appropriate bundle. +Stride tries to place assets in the most appropriate bundle. -1. Assets not defined in `Bundles` are placed in the **default** bundle, which is loaded automatically -2. If an asset is selected by **BundleA** and **BundleB**, but **BundleB** has a dependency on **BundleA**, that asset is placed only in **BundleA** +1. Assets not defined in `Bundles` are placed in the **default** bundle, which is loaded automatically when the game starts. +2. If an asset is selected by **BundleA** and **BundleB**, but **BundleB** has a dependency on **BundleA**, that asset is placed only in **BundleA**. 3. If an asset is selected by **BundleA** and **BundleB** and both of them aren't dependent on each other, that asset is placed in both of them. TODO: VISUALIZATION @@ -74,9 +74,11 @@ TODO: CHECK ABOVE Stride **automatically loads the default bundle**. However, other bundles need to be manually loaded through code. ```csharp -Content.FileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); +await Content.FileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); ``` +TODO: CHECK IF DEPENDENCIES ARE LOADED AUTOMATICALLY + Assets can then be loaded via the **content system**. For more information, visit the [use an asset in code page](use-an-asset-in-code.md). ## Bundle location From f46f6a652cf7d0576be73587aeb9e50785b6c2f8 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Thu, 7 May 2026 08:47:41 +0200 Subject: [PATCH 06/22] Minor fixes --- en/manual/assets/create-an-asset.md | 4 ++-- en/manual/assets/edit-an-asset.md | 9 +++------ en/manual/assets/index.md | 8 ++++---- en/manual/assets/use-an-asset.md | 21 ++++++++++++++++++--- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index f924c55ef..e854f698b 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -26,11 +26,11 @@ To create an asset from a resource, simply drag and drop it into the **asset vie TODO: IMAGE -You will be asked, if you want to **copy the dragged file to the resources folder**. Most of the time, **you want to do this**, in order to make the project easier to share and use version control with. +You will be asked, if you want to **copy the dragged file to the resources folder**. Most of the time, **you will want to do this** in order to make the project easier to share and use version control with. TODO: IMAGE -Finally, you will be asked if you want to **move it to the default location**. Again, most of the time **you want to do this**, unless you need more control over where resources end up. +Finally, you will be asked if you want to **move it to the default location**. Again, most of the time **you will want to do this**, unless you need more control over where resources end up. TODO: IMAGE diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 7794fc1f7..7bd72855a 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -18,7 +18,7 @@ Modified assets aren't automatically saved. You will have to save them manually Certain assets require the use of a dedicated editor. The most notable example of this are **Scenes**. -Currently the assets that have a dedicated editor are: +Currently, the assets that have a dedicated editor are: * Graphics compositor * Prefabs @@ -27,13 +27,10 @@ Currently the assets that have a dedicated editor are: * Ui pages * Ui libraries * Scripts -* TODO: CHECK ALL OF THIS -To open a dedicated editor for an asset: +To open a dedicated editor for an asset simply **double click it**, right click and select **Edit asset** or select it and press **Ctrl + Enter**. -* Double click it -* Right click and select **Edit asset** -* Select it and press **Ctrl + Enter** +TODO: IMAGE OF CONTEXT MENU # See also diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index 76f356869..1f8f03f85 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -1,12 +1,12 @@ # Assets -**Assets** are representations of elements in a project (such as scenes, textures or audio) which can be used by scripts or other assets. An example would be the **model component** using a **model asset**. +**Assets** are representations of elements in a project (such as scenes, textures or audio), which can be used by scripts or other assets. An example would be the **model component** using a **model asset**. -**Resources** on the other hand are the files containing actual data, which can then be used by assets. +**Resources** on the other hand are the files containing actual data (such as images or music), which can then be used by assets. In short: -* **Resources** are raw data files (`.png`, `.wav`, `.fbx`) -* **Assets** is what can be used in game. They can reference resource files and contain additional properties. +* **Resources** - raw data files (`.png`, `.wav`, `.fbx`) +* **Assets** - an element that can be used in a game. They can use resource files and contain additional properties. ## Location of assets and resources diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index e81801270..8a3bbe778 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -4,19 +4,34 @@ Assets can be referenced by other assets or components in a scene. ## Components and other assets -In the **property grid** you can sometimes find a property that looks like this: +In the **property grid**, you can sometimes find a property that looks like this: TODO: IMAGE -This is where you can assign a reference to another asset. There are two available buttons: +In here, you can assign a reference to another asset. There are two available buttons: + * 👆 **Hand** - opens up a dialogue to select an existing asset. -* **Eraser** - clears the reference. +* TODO: IMAGE **Eraser** - clears the reference. > [!TIP] > You can also **drag and drop** an asset from the **asset view**. > > TODO: IMAGE +## Your own scripts + +You can create an assignable reference to an asset in your script by creating a property or field with an asset type. + +```csharp +public Model MyModel { get; set; } +``` + +This will show up in the **property grid** like so. + +TODO: IMAGE + +This way, the asset will be loaded automatically. However, Stride also provides a way of **managing loading manually**. For more information, visit the [use an asset in code page](use-an-asset-in-code.md). + ## See also * [Use an asset in code](use-an-asset-in-code.md) From 85bca19d4551fee12d52c85cc16d777da6398330 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Thu, 7 May 2026 10:24:19 +0200 Subject: [PATCH 07/22] Tags page --- en/manual/assets/index.md | 1 + en/manual/assets/media/property-grid-tags.webp | 3 +++ en/manual/assets/tags.md | 18 ++++++++++++++++++ en/manual/toc.yml | 2 ++ 4 files changed, 24 insertions(+) create mode 100644 en/manual/assets/media/property-grid-tags.webp create mode 100644 en/manual/assets/tags.md diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index 1f8f03f85..c14d03855 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -24,6 +24,7 @@ For more information, visit the [project file structure page](../files-and-folde * [Edit an asset](edit-an-asset.md) * [Use an asset](use-an-asset.md) * [Use an asset in code](use-an-asset-in-code.md) +* [Tags](tags.md) * [Archetypes](archetypes.md) * [Asset compilation](asset-compilation.md) * [Asset bundles](asset-bundles.md) diff --git a/en/manual/assets/media/property-grid-tags.webp b/en/manual/assets/media/property-grid-tags.webp new file mode 100644 index 000000000..e284a3612 --- /dev/null +++ b/en/manual/assets/media/property-grid-tags.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f600de6536e248125d4ead02c3fe0de41ce00c2f787f11d0304c92030f3c9fca +size 6310 diff --git a/en/manual/assets/tags.md b/en/manual/assets/tags.md new file mode 100644 index 000000000..640ecd13a --- /dev/null +++ b/en/manual/assets/tags.md @@ -0,0 +1,18 @@ +# Tags + +Assets can be tagged to help search for them more easily, or to organize them in [asset bundles](asset-bundles.md). + +Tags aren't available at runtime. They are only used as a tool in **Game Studio** and during asset compilation. + +## Add or remove a tag + +An asset's tags are displayed at the top of the **property grid**. + +![](media/property-grid-tags.webp) + +You can remove a tag by clicking 🗙 and add a new one in the **Add a new tag** box. + +## See also + +* [Edit an asset](edit-an-asset.md) +* [Asset bundles](asset-bundles.md) diff --git a/en/manual/toc.yml b/en/manual/toc.yml index de3356e9e..c67ed6f7b 100644 --- a/en/manual/toc.yml +++ b/en/manual/toc.yml @@ -71,6 +71,8 @@ items: href: assets/use-an-asset.md - name: Use an asset in code href: assets/use-an-asset-in-code.md + - name: Tags + href: assets/tags.md - name: Archetypes href: assets/archetypes.md - name: Asset compilation From 83fb9945c59ed253f11a13f53a112d1e25736f15 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Thu, 7 May 2026 10:27:42 +0200 Subject: [PATCH 08/22] Updated unchecked information --- en/manual/assets/asset-bundles.md | 7 +++---- en/manual/assets/edit-an-asset.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index b1ab979f0..f18e24339 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -65,9 +65,7 @@ Stride tries to place assets in the most appropriate bundle. TODO: VISUALIZATION > [!NOTE] -> Loading two bundles with the same asset won't result in a duplicate! - -TODO: CHECK ABOVE +> Loading two bundles with the same asset won't result in a duplicate. ## Loading bundles @@ -77,7 +75,8 @@ Stride **automatically loads the default bundle**. However, other bundles need t await Content.FileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); ``` -TODO: CHECK IF DEPENDENCIES ARE LOADED AUTOMATICALLY +> [!NOTE] +> When loading a bundle, it's dependencies are loaded automatically. Assets can then be loaded via the **content system**. For more information, visit the [use an asset in code page](use-an-asset-in-code.md). diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 7bd72855a..9cca340a3 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -12,7 +12,7 @@ Your changes will be reflected in the **asset preview** in real time. TODO: IMAGE -Modified assets aren't automatically saved. You will have to save them manually by going to **File > Save** TODO CHECK THIS or by pressing a keyboard shortcut (Ctrl + S by default TODO check if shortcuts can be modified). +Modified assets aren't automatically saved. You will have to save them manually by going to **File > Save** or by pressing **Ctrl + S**. ## Editing using a dedicated editor From 5743aae0a7f387c608b7493561b5bdeb2b813574 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Thu, 7 May 2026 11:23:23 +0200 Subject: [PATCH 09/22] Images --- en/manual/assets/archetypes.md | 6 +++--- en/manual/assets/asset-compilation.md | 4 ++-- en/manual/assets/create-an-asset.md | 20 ++++++------------- en/manual/assets/edit-an-asset.md | 6 +++--- en/manual/assets/index.md | 2 +- en/manual/assets/media/asset-preview.webp | 3 +++ .../assets/media/asset-view-add-asset.webp | 3 +++ .../media/asset-view-copy-resource.webp | 0 .../media/asset-view-create-derived.webp | 3 +++ .../media/asset-view-create-new.webp | 0 .../assets/media/asset-view-edit-asset.webp | 3 +++ .../media/asset-view-from-resource-type.webp | 0 .../media/asset-view-include-root.webp | 0 .../media/asset-view-indicators.webp | 0 .../asset-view-resource-default-location.webp | 0 .../media/property-grid-asset-properties.webp | 3 +++ ...ty-grid-asset-reference-drag-and-drop.webp | 3 +++ .../media/property-grid-asset-reference.webp | 3 +++ ...roperty-grid-direct-reference-example.webp | 3 +++ .../property-grid-overriden-property.webp | 3 +++ .../media/property-grid-reset-to-base.webp | 3 +++ .../property-grid-url-reference-example.webp | 3 +++ .../media/solution-explorer-assets.webp | 3 +++ en/manual/assets/use-an-asset-in-code.md | 4 ++-- en/manual/assets/use-an-asset.md | 10 +++++----- en/manual/get-started/assets.md | 14 ++++++------- 26 files changed, 65 insertions(+), 37 deletions(-) create mode 100644 en/manual/assets/media/asset-preview.webp create mode 100644 en/manual/assets/media/asset-view-add-asset.webp rename en/manual/{get-started => assets}/media/asset-view-copy-resource.webp (100%) create mode 100644 en/manual/assets/media/asset-view-create-derived.webp rename en/manual/{get-started => assets}/media/asset-view-create-new.webp (100%) create mode 100644 en/manual/assets/media/asset-view-edit-asset.webp rename en/manual/{get-started => assets}/media/asset-view-from-resource-type.webp (100%) rename en/manual/{get-started => assets}/media/asset-view-include-root.webp (100%) rename en/manual/{get-started => assets}/media/asset-view-indicators.webp (100%) rename en/manual/{get-started => assets}/media/asset-view-resource-default-location.webp (100%) create mode 100644 en/manual/assets/media/property-grid-asset-properties.webp create mode 100644 en/manual/assets/media/property-grid-asset-reference-drag-and-drop.webp create mode 100644 en/manual/assets/media/property-grid-asset-reference.webp create mode 100644 en/manual/assets/media/property-grid-direct-reference-example.webp create mode 100644 en/manual/assets/media/property-grid-overriden-property.webp create mode 100644 en/manual/assets/media/property-grid-reset-to-base.webp create mode 100644 en/manual/assets/media/property-grid-url-reference-example.webp create mode 100644 en/manual/assets/media/solution-explorer-assets.webp diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md index 716de280f..6600da591 100644 --- a/en/manual/assets/archetypes.md +++ b/en/manual/assets/archetypes.md @@ -13,7 +13,7 @@ Here is some terminology to keep in mind: In the **asset view**, right click on the asset you want to derive from and select **Create derived asset**. -TODO: IMAGE +![](media/asset-view-create-derived.webp) **Game Studio** then creates a new derived asset which you can modify. @@ -21,7 +21,7 @@ TODO: IMAGE When changing a property of a derived asset in the **property grid**, it will be marked as an overridden. Overridden properties are slightly brighter and bolder. -TODO: IMAGE +![](media/property-grid-overriden-property.webp) Override properties will not be updated when they are changed on the archetype. @@ -33,7 +33,7 @@ In case you want to revert a property to use the same values as the archetype, r If you want to turn a derived asset into a normal one (unlinking it from the archetype), in the **asset view** right click on it and select **Clear archetype**. -TODO: IMAGE +![](media/property-grid-reset-to-base.webp) The asset will now no longer follow changes done to the archetype. diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index f52ddbd94..658e04cfc 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -12,7 +12,7 @@ TODO: VISUALIZATION In the **asset view**, you can see a dot in the top left corner that signifies how an asset will be compiled. -TODO: IMAGE +![](media/asset-view-indicators.webp) Each color represents something: @@ -33,7 +33,7 @@ A few remarks: You can mark an asset as root by right clicking on it in the **asset view** and selecting **🔵 Mark as root**. -TODO: IMAGE +![](media/asset-view-include-root.webp) > [!WARNING] > Marking an asset as root in **Game Studio** will only mark it **for the selected platform**. Make sure to either: diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index e854f698b..180124f26 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -6,33 +6,25 @@ Assets can be created with **Game Studio** in the **asset view**. 1. In the **asset view**, click the **Add assets** button. - TODO: IMAGE + ![](media/asset-view-add-asset.webp) 2. Select the type of asset you want to create. - TODO: IMAGE - -3. If the asset requires a resource, it will prompt you to select it from the resources folder or somewhere else on your computer. - - TODO: IMAGE - - If the resource isn't present in the resources folder, **Game Studio** will ask you if you want to move it there. In the majority of cases, **you will want to click yes**. - - TODO: IMAGE + ![](media/asset-view-create-new.webp) ## Create an asset from resource To create an asset from a resource, simply drag and drop it into the **asset view** and select the type of resource you want to create. -TODO: IMAGE +![](media/asset-view-from-resource-type.webp) -You will be asked, if you want to **copy the dragged file to the resources folder**. Most of the time, **you will want to do this** in order to make the project easier to share and use version control with. +If the resource isn't present in the resources folder, **Game Studio** will ask you if you want to move it there. In the majority of cases, **you will want to click yes**. -TODO: IMAGE +![](media/asset-view-copy-resource.webp) Finally, you will be asked if you want to **move it to the default location**. Again, most of the time **you will want to do this**, unless you need more control over where resources end up. -TODO: IMAGE +![](media/asset-view-resource-default-location.webp) ## See also * [Edit an asset](edit-an-asset.md) diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 9cca340a3..cb368e7af 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -6,11 +6,11 @@ Assets can be edited in **Game Studio**. When you select an asset in the **asset view**, it's properties will show up in the **property grid**. -TODO: IMAGE +![](media/property-grid-asset-properties.webp) Your changes will be reflected in the **asset preview** in real time. -TODO: IMAGE +![](media/asset-preview.webp) Modified assets aren't automatically saved. You will have to save them manually by going to **File > Save** or by pressing **Ctrl + S**. @@ -30,7 +30,7 @@ Currently, the assets that have a dedicated editor are: To open a dedicated editor for an asset simply **double click it**, right click and select **Edit asset** or select it and press **Ctrl + Enter**. -TODO: IMAGE OF CONTEXT MENU +![](media/asset-view-edit-asset.webp) # See also diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index c14d03855..30efc54ef 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -12,7 +12,7 @@ In short: In **Game Studio** you can view assets in the **asset view** by selecting an **assets** folder in the **solution explorer**. -TODO: IMAGE +![](media/solution-explorer-assets.webp) As for **resources**, it isn't possible to view them in **Game Studio**. You can browse through them by opening the directory containing your project and going to a resource folder of the target [project package](../files-and-folders/project-packages/index.md). diff --git a/en/manual/assets/media/asset-preview.webp b/en/manual/assets/media/asset-preview.webp new file mode 100644 index 000000000..c17cef6d4 --- /dev/null +++ b/en/manual/assets/media/asset-preview.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd00458a1ab0a4990ba74eb5783d1d07c0f8bd53e15c3568b4ce2b758ff8098c +size 7742 diff --git a/en/manual/assets/media/asset-view-add-asset.webp b/en/manual/assets/media/asset-view-add-asset.webp new file mode 100644 index 000000000..8d23208bf --- /dev/null +++ b/en/manual/assets/media/asset-view-add-asset.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c71ec937664037bcded8c9f355512e3d10801fda66a3ad9f26450a0ac989aa72 +size 3362 diff --git a/en/manual/get-started/media/asset-view-copy-resource.webp b/en/manual/assets/media/asset-view-copy-resource.webp similarity index 100% rename from en/manual/get-started/media/asset-view-copy-resource.webp rename to en/manual/assets/media/asset-view-copy-resource.webp diff --git a/en/manual/assets/media/asset-view-create-derived.webp b/en/manual/assets/media/asset-view-create-derived.webp new file mode 100644 index 000000000..42bfa96fd --- /dev/null +++ b/en/manual/assets/media/asset-view-create-derived.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc7434fbcfdf09fdf56655c1ee7755592408dce554f6d699abb029a21e0d8ecd +size 42724 diff --git a/en/manual/get-started/media/asset-view-create-new.webp b/en/manual/assets/media/asset-view-create-new.webp similarity index 100% rename from en/manual/get-started/media/asset-view-create-new.webp rename to en/manual/assets/media/asset-view-create-new.webp diff --git a/en/manual/assets/media/asset-view-edit-asset.webp b/en/manual/assets/media/asset-view-edit-asset.webp new file mode 100644 index 000000000..9ee982569 --- /dev/null +++ b/en/manual/assets/media/asset-view-edit-asset.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:704c5e86bda8a01fe5e53f99739b823de618236f56f21b85108b6e8e085192d4 +size 10810 diff --git a/en/manual/get-started/media/asset-view-from-resource-type.webp b/en/manual/assets/media/asset-view-from-resource-type.webp similarity index 100% rename from en/manual/get-started/media/asset-view-from-resource-type.webp rename to en/manual/assets/media/asset-view-from-resource-type.webp diff --git a/en/manual/get-started/media/asset-view-include-root.webp b/en/manual/assets/media/asset-view-include-root.webp similarity index 100% rename from en/manual/get-started/media/asset-view-include-root.webp rename to en/manual/assets/media/asset-view-include-root.webp diff --git a/en/manual/get-started/media/asset-view-indicators.webp b/en/manual/assets/media/asset-view-indicators.webp similarity index 100% rename from en/manual/get-started/media/asset-view-indicators.webp rename to en/manual/assets/media/asset-view-indicators.webp diff --git a/en/manual/get-started/media/asset-view-resource-default-location.webp b/en/manual/assets/media/asset-view-resource-default-location.webp similarity index 100% rename from en/manual/get-started/media/asset-view-resource-default-location.webp rename to en/manual/assets/media/asset-view-resource-default-location.webp diff --git a/en/manual/assets/media/property-grid-asset-properties.webp b/en/manual/assets/media/property-grid-asset-properties.webp new file mode 100644 index 000000000..0c2b963ca --- /dev/null +++ b/en/manual/assets/media/property-grid-asset-properties.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0008ed3bde31767b3081af578a21072914193287da19e0500a7ba6de8101e351 +size 51624 diff --git a/en/manual/assets/media/property-grid-asset-reference-drag-and-drop.webp b/en/manual/assets/media/property-grid-asset-reference-drag-and-drop.webp new file mode 100644 index 000000000..841d620b1 --- /dev/null +++ b/en/manual/assets/media/property-grid-asset-reference-drag-and-drop.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ca1a45d39b7c4499c928c4709ca2876ec874f9d9910cc1cf4ab3beaac2898ab +size 5364 diff --git a/en/manual/assets/media/property-grid-asset-reference.webp b/en/manual/assets/media/property-grid-asset-reference.webp new file mode 100644 index 000000000..486b40fb6 --- /dev/null +++ b/en/manual/assets/media/property-grid-asset-reference.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:824d00468991e083c09d59102c75a16d52f3df7c270d8c96a9b215fd3b3512f5 +size 2992 diff --git a/en/manual/assets/media/property-grid-direct-reference-example.webp b/en/manual/assets/media/property-grid-direct-reference-example.webp new file mode 100644 index 000000000..991756f5b --- /dev/null +++ b/en/manual/assets/media/property-grid-direct-reference-example.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9baadc5dcc17602c81b6dd068337b00a3ca06529bbbd6d84b5c59af8cbb5c221 +size 6028 diff --git a/en/manual/assets/media/property-grid-overriden-property.webp b/en/manual/assets/media/property-grid-overriden-property.webp new file mode 100644 index 000000000..6517c6a36 --- /dev/null +++ b/en/manual/assets/media/property-grid-overriden-property.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6b99f979ba85eebc1133d653f090864f6df3b288e5146e2cf899994a7409a43 +size 7782 diff --git a/en/manual/assets/media/property-grid-reset-to-base.webp b/en/manual/assets/media/property-grid-reset-to-base.webp new file mode 100644 index 000000000..140bb8024 --- /dev/null +++ b/en/manual/assets/media/property-grid-reset-to-base.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d94dc7dc654b3f37feaeb7730ebf69e77044054b909df82e12aece390c720523 +size 12240 diff --git a/en/manual/assets/media/property-grid-url-reference-example.webp b/en/manual/assets/media/property-grid-url-reference-example.webp new file mode 100644 index 000000000..e6e341fec --- /dev/null +++ b/en/manual/assets/media/property-grid-url-reference-example.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6433dc9e92f399407896ef83d8053052ca5d2cc36398e4b9b5141d6b35d9ed92 +size 6558 diff --git a/en/manual/assets/media/solution-explorer-assets.webp b/en/manual/assets/media/solution-explorer-assets.webp new file mode 100644 index 000000000..23dd8ee84 --- /dev/null +++ b/en/manual/assets/media/solution-explorer-assets.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2116a144a5f7eee6e8207c889143a2542073aecf5f35d902edc55a6054429295 +size 11730 diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md index 993d3b05b..4c8c0b07b 100644 --- a/en/manual/assets/use-an-asset-in-code.md +++ b/en/manual/assets/use-an-asset-in-code.md @@ -19,7 +19,7 @@ public class Example : StartupScript The above will show up in the **property grid** like so: -TODO: IMAGE +![](media/property-grid-direct-reference-example.webp) Stride will then automatically handle assigning and manage the reference count. However, if you want more control, consider using a [url reference](#url-reference) instead. @@ -65,7 +65,7 @@ public class Example : StartupScript It will show up in the **property grid** like so: -TODO: IMAGE +![](media/property-grid-url-reference-example.webp) You can retrieve the asset through code via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index 8a3bbe778..e46653d9f 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -6,29 +6,29 @@ Assets can be referenced by other assets or components in a scene. In the **property grid**, you can sometimes find a property that looks like this: -TODO: IMAGE +![](media/property-grid-asset-reference.webp) In here, you can assign a reference to another asset. There are two available buttons: * 👆 **Hand** - opens up a dialogue to select an existing asset. -* TODO: IMAGE **Eraser** - clears the reference. +* **Eraser** - clears the reference. > [!TIP] > You can also **drag and drop** an asset from the **asset view**. > -> TODO: IMAGE +> ![](media/property-grid-asset-reference-drag-and-drop.webp) ## Your own scripts You can create an assignable reference to an asset in your script by creating a property or field with an asset type. ```csharp -public Model MyModel { get; set; } +public Model ModelAsset { get; set; } ``` This will show up in the **property grid** like so. -TODO: IMAGE +![](media/property-grid-direct-reference-example.webp) This way, the asset will be loaded automatically. However, Stride also provides a way of **managing loading manually**. For more information, visit the [use an asset in code page](use-an-asset-in-code.md). diff --git a/en/manual/get-started/assets.md b/en/manual/get-started/assets.md index b4f556580..09b864b5b 100644 --- a/en/manual/get-started/assets.md +++ b/en/manual/get-started/assets.md @@ -8,7 +8,7 @@ An asset is a representation of an element of your game inside Game Studio, such To create an asset, click the "Add Asset" button in the **Asset View** and select the type of asset you want to create. -![Image of the "Add Asset" menu in the asset view.](media/asset-view-create-new.webp) +![](../assets/media/asset-view-create-new.webp) ## Create assets from resources @@ -16,19 +16,19 @@ To create an asset from a resource, simply drag and drop it from a folder. Then, select the type of resource you want to create. -![Popup showing a list of assets that can be created from the dragged resource.](media/asset-view-from-resource-type.webp) +![](../assets/media/asset-view-from-resource-type.webp) You will be asked, if you want to **copy the dragged file to the resources folder**. Most of the time, **you want to do this**, in order to make the project easier to share and use version control with. -![A popup "Source file 'C:/Users/franc/Downloads/Grass0044K-PNG/Grass0044K-PNG_Color.png' is not inside of your project's resource folders, do you want to copy it?" with two options "yes" and "no".](media/asset-view-copy-resource.webp) +![](../assets/media/asset-view-copy-resource.webp) Finally, you will be asked if you want to **move it to the default location**. Again, most of the time **you want to do this**, unless you need more control over where resources end up. -![A popup "Do you want to place the resource in the default location ?" with two options "yes" and "no"](media/asset-view-resource-default-location.webp) +![](../assets/media/asset-view-resource-default-location.webp) ## Green, blue and gray dots -![A screenshot of three items in the Asset View, all having a small circle in the top left corner of their icon with one being blue, one green and one gray.](media/asset-view-indicators.webp) +![](../assets/media/asset-view-indicators.webp) Every asset has a little dot in the top left corner of their icon. This dot indicates if an asset is going to be included when building the project: * **Blue** - the asset will be included in the build no matter if it's needed or not. @@ -37,8 +37,8 @@ Every asset has a little dot in the top left corner of their icon. This dot indi Stride doesn't include assets which aren't used anywhere, meaning that **they cannot be accessed when running the game**. In order to ensure, that an asset will always be included in the build, right click on it and select **Include in build as root asset**. -![A screenshot of an asset's context menu, highlighting an item "Include in build as root asset".](media/asset-view-include-root.webp) +![](../assets/media/asset-view-include-root.webp) ## Further reading -For more information, visit the [Assets](../game-studio/assets.md) page. +For more information, visit the [Assets](../assets/index.md) page. From abb2958caf4740e0b44d7e41e28d5ac137cde8f4 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Thu, 7 May 2026 14:56:32 +0200 Subject: [PATCH 10/22] Removed game studio > assets and relinked everything --- en/manual/animation/index.md | 4 +- en/manual/engine/index.md | 2 +- en/manual/game-studio/archetypes.md | 71 ------- en/manual/game-studio/assets.md | 35 ---- en/manual/game-studio/create-assets.md | 66 ------- en/manual/game-studio/game-settings.md | 2 +- en/manual/game-studio/index.md | 5 - en/manual/game-studio/load-scenes.md | 4 +- en/manual/game-studio/manage-assets.md | 149 --------------- en/manual/game-studio/prefabs/index.md | 2 +- .../game-studio/prefabs/prefab-models.md | 2 +- en/manual/game-studio/use-assets.md | 175 ------------------ en/manual/glossary/index.md | 12 +- en/manual/scripts/create-a-model-from-code.md | 4 +- en/manual/sprites/import-sprite-sheets.md | 2 +- .../stride-for-godot-developers/index.md | 2 +- .../stride-for-unity-developers/index.md | 4 +- en/manual/toc.yml | 11 -- en/manual/video/set-up-a-video.md | 4 +- .../csharpbeginner/loading-content.md | 2 +- 20 files changed, 23 insertions(+), 535 deletions(-) delete mode 100644 en/manual/game-studio/archetypes.md delete mode 100644 en/manual/game-studio/assets.md delete mode 100644 en/manual/game-studio/create-assets.md delete mode 100644 en/manual/game-studio/manage-assets.md delete mode 100644 en/manual/game-studio/use-assets.md diff --git a/en/manual/animation/index.md b/en/manual/animation/index.md index 9a16546e6..fbd996daa 100644 --- a/en/manual/animation/index.md +++ b/en/manual/animation/index.md @@ -28,7 +28,7 @@ Skeletons don't have to resemble the skeletons of real humans or animals. You ca **Skinned models** are models that have been skinned to match a skeleton. The **skin** describes how vertices of the mesh transform when bones move. >[!NOTE] ->In Game Studio, you can only create simple 3D models such as spheres and cubes. For information about how to do this, see [Create assets](../game-studio/create-assets.md). To create more complex models, use dedicated software like 3DS Max, Maya, or Blender, then [import the model into Game Studio](import-animations.md). +>In Game Studio, you can only create simple 3D models such as spheres and cubes. For information about how to do this, see the [create an asset page](../assets/create-an-asset.md). To create more complex models, use dedicated software like 3DS Max, Maya, or Blender, then [import the model into Game Studio](import-animations.md). ## Animation clips @@ -53,4 +53,4 @@ The templates **First-person shooter**, **Third-person platformer** and **Top-do * [Procedural animation](procedural-animation.md) * [Custom blend trees](custom-blend-trees.md) * [Model node links](model-node-links.md) -* [Custom attributes](custom-attributes.md) \ No newline at end of file +* [Custom attributes](custom-attributes.md) diff --git a/en/manual/engine/index.md b/en/manual/engine/index.md index a8548337b..967cedaeb 100644 --- a/en/manual/engine/index.md +++ b/en/manual/engine/index.md @@ -10,5 +10,5 @@ # See also -- [Introduction to assets](../game-studio/assets.md) +- [Assets](../assets/index.md) - [Scripts](../scripts/index.md) diff --git a/en/manual/game-studio/archetypes.md b/en/manual/game-studio/archetypes.md deleted file mode 100644 index 03d129028..000000000 --- a/en/manual/game-studio/archetypes.md +++ /dev/null @@ -1,71 +0,0 @@ -# Archetypes - -Intermediate -Designer - -An **archetype** is a master asset that controls the properties of assets you **derive** from it. Derived assets are useful when you want to create a "remixed" version of an asset. - -For example, imagine we have three sphere entities that share a material asset named *Metal*. The Metal asset has properties including color, gloss, and so on. - -![Three metal spheres](media/archetypes-three-spheres-metal.webp) - -If we change a property in the **Metal** asset, it applies to all three spheres. So, for example, if we change the color property, all three spheres change color. - -![Three gold spheres](media/archetypes-three-spheres-gold.webp) - -Now imagine we want to change the color of only *one* sphere, but keep its other properties the same. We could duplicate the material asset, change its color, and then apply the new asset to only one sphere. But if we later want to change a different property across *all* the spheres, we have to modify both assets. This is time-consuming and leaves room for mistakes. - -The better approach is to derive a new asset from the archetype. The derived asset inherits properties from the archetype and lets you override individual properties where you need them. For example, we can derive the sphere's material asset and override its color. Then, if we change the gloss of the archetype, the gloss of all three spheres changes. - -![Create derived asset](media/archetypes-three-spheres.png) - -You can derive an asset from an archetype, then in turn derive another asset from that derived asset. This way you can create different layers of assets to keep your project organized: - -```cs -Archetype - Derived asset - Derived asset -``` - -## Derive an asset from an archetype - -In the **Asset View**, right-click the asset you want to derive an asset from and select **Create derived asset**: - -![Create derived asset](media/archetypes-create-derived-asset.png) - -Game Studio adds a new **derived asset** to the project. This asset derives its properties from the **archetype** asset. - -The derived asset properties display the archetype asset under **Archetype**: - -![Derived asset in Property Grid](media/archetypes-archetype-in-property-grid.png) - -You can right-click the archetype asset in the Property Grid and select **Select the referenced asset** to quickly select the archetype asset: - -![Select referenced asset](media/archetypes-select-the-referenced-asset.png) - -### Overridden properties - -The **Property Grid** shows which properties of the derived asset differ from the archetype. **Overridden** and **unique** properties are **white**, and **inherited** (identical) properties are **gray**. - -In this screenshot, the **Diffuse Map** property is overridden. The other properties are inherited: - -![Overridden properties are white](media/archetypes-overriden-properties-appear-white.png) - -### Reset a property to archetype value - -You can reset overridden or unique properties of a derived asset to the values in the archetype. To do this, right-click the overridden property and select **Reset to base value**. - -![Reset to base value](media/archetypes-reset-property-to-base-value.png) - -### Clear an archetype - -You can remove the link between the archetype and the derived asset. This means the derived asset no longer inherits changes to the archetype; it becomes a completely independent. - -To do this, in the **Asset View**, right-click the derived asset and select **Clear archetype**. - -![Clear archetype](media/archetypes-clear-archetypes.png) - -## See also - -* [Assets](../game-studio/assets.md) -* [Prefabs](prefabs/index.md) \ No newline at end of file diff --git a/en/manual/game-studio/assets.md b/en/manual/game-studio/assets.md deleted file mode 100644 index f55f8b1fd..000000000 --- a/en/manual/game-studio/assets.md +++ /dev/null @@ -1,35 +0,0 @@ -# Assets - -Beginner - -An **asset** is a representation of an element of your game inside Game Studio, such as a texture, animation, or model. - -Some assets require **resource files**. For example, texture assets need image files and audio assets need audio files. Other types of assets (such as scenes, physics colliders, and game settings) don't use resource files, and can be created entirely in Game Studio. - -You can compile and optimize assets with a special compiler provided by Stride. Compiled assets are packed together as reusable bundles. - -![Assets displayed in the Asset View](../get-started/media/asset-creation-asset-view-tab-knight.png) - -You can: - -* create and browse assets in the **Asset View** - - ![media/Editor2_assetview_thumb.jpg](media/Editor2_assetview_thumb.jpg) - -* import existing assets, such as FBX files - - ![media/EditorImportAssets_explorer_thumb.jpg](media/EditorImportAssets_explorer_thumb.jpg) - -* edit assets in the **property editor** - - ![media/EditorProperties_props_thumb.jpg](media/EditorProperties_props_thumb.jpg) - -* see a live preview in the **Asset Preview** - - ![media/EditorProperties_preview_thumb.jpg](media/EditorProperties_preview_thumb.jpg) - -## In this section - -* [Create assets](create-assets.md) -* [Manage assets](manage-assets.md) -* [Use assets](use-assets.md) \ No newline at end of file diff --git a/en/manual/game-studio/create-assets.md b/en/manual/game-studio/create-assets.md deleted file mode 100644 index f470775f9..000000000 --- a/en/manual/game-studio/create-assets.md +++ /dev/null @@ -1,66 +0,0 @@ -# Create assets - -Beginner - -There are two ways to create assets: - -* Use the **Add asset** button in the **Asset View** -* Drag and drop **resource files** (such as image or audio files) to the **Asset View** tab - -## Use the **Add asset** button - - 1. In the *Asset View*, click ![](media/create-and-add-assets-add-new-asset-button.png) - - 2. Select the type of asset you want to create. - - ![Select asset type](../get-started/media/asset-creation-create-new-asset-asset-view-tab.png) - - Game Studio displays a list of asset templates. These are assets configured for a specific use. - - 3. Select the right template for your asset. - - Game Studio adds the asset to the Asset View: - - ![Asset added to Asset View' tab](../get-started/media/asset-creation-asset-view-tab-procedural-model.png) - -> [!Note] -> Some assets, such as textures, require a resource file. When you add these assets, Game Studio prompts you for a resource file. - -## Drag and drop resource files - -You can drag compatible resource files directly into Game Studio to create assets from them. Game Studio is compatible with common file formats. - -> [!NOTE] -> * You can't use this method to create assets that don't use resource files (eg prefabs, materials, or scenes). - -| Asset type | Compatible resource file formats -|-------------------------------|---------------------------------- -| Models, animations, skeletons | .dae, .3ds, obj, .blend, .x, .md2, .md3, .dxf, .fbx -| Sprites, textures, skyboxes | .dds, .jpg, .jpeg, .png, .gif, .bmp, .tga, .psd, .tif, .tiff -| Audio | .wav, .mp3, .ogg, .aac, .aiff, .flac, .m4a, .wma, .mpc - -To create an asset by dragging and dropping a resource file: - -1. (Optional) If it isn't there already, move the resource file you want to use in the **Resources** folder of your project. You don't have to do this, but it's good practice to keep resource files organized and makes projects easier to share. For more information, see [Project structure](../files-and-folders/project-structure.md). - -2. Drag the resource file from Explorer to the Asset View: - - ![Drap and drop a resource file to the Asset View](media/create-assets-drop-resource.png) - -3. Select the kind of asset you want to create: - - ![List of asset templates](media/create-assets-drag-drop-select-asset-template.png) - - Game Studio adds the asset to the Asset View: - - ![Texture asset created](media/create-assets-drag-drop-asset-created.png) - -Game Studio automatically imports all dependencies in the resource files and creates corresponding assets. For example, you can add a model or animation resource file and Game Studio handles everything else. - -> [!TIP] -> You can drag multiple files simultaneously. If you drop multiple files of different types at the same time, Game Studio only adds only files that match your template selection. For example, if you add an image file and a sound file, then select the audio asset template, only the sound file is added. - -## See also - -* [Manage assets](manage-assets.md) -* [Use assets](use-assets.md) \ No newline at end of file diff --git a/en/manual/game-studio/game-settings.md b/en/manual/game-studio/game-settings.md index b42e02d50..be4190f24 100644 --- a/en/manual/game-studio/game-settings.md +++ b/en/manual/game-studio/game-settings.md @@ -225,4 +225,4 @@ For more information, see [Splash screen](/splash-screen.md). ## See also -* [Assets](../game-studio/assets.md) \ No newline at end of file +* [Assets](../assets/index.md) diff --git a/en/manual/game-studio/index.md b/en/manual/game-studio/index.md index 8fb8650f4..63579de4c 100644 --- a/en/manual/game-studio/index.md +++ b/en/manual/game-studio/index.md @@ -36,11 +36,6 @@ You can show and hide different parts of the Game Studio in the View menu. You c * [Load scenes](load-scenes.md) * [Add entities](add-entities.md) * [Manage entities](manage-entities.md) -* [Assets](assets.md) - * [Create assets](create-assets.md) - * [Use assets](use-assets.md) - * [Archetypes](archetypes.md) - * [Game settings](game-settings.md) * [Prefabs](prefabs/index.md) * [Create a prefab](prefabs/create-a-prefab.md) * [Use prefabs](prefabs/use-prefabs.md) diff --git a/en/manual/game-studio/load-scenes.md b/en/manual/game-studio/load-scenes.md index 0c89cc44a..6e4d498de 100644 --- a/en/manual/game-studio/load-scenes.md +++ b/en/manual/game-studio/load-scenes.md @@ -32,7 +32,7 @@ myChildScene1.Add(myChildScene2); >To include a scene in the build, in the **Asset View**, right-click the scene asset and select **Include in build as root asset**. ->For more information about including assets in the build, see [Manage assets](manage-assets.md). +>For more information about including assets in the build, see [the asset compilation page](../assets/asset-compilation.md). For more information about scene hierarchies, see [Manage scenes](manage-scenes.md). @@ -110,4 +110,4 @@ At runtime, when the trigger you created in step 1 is triggered, Stride loads th * [Navigate in the Scene Editor](navigate-in-the-scene-editor.md) * [Manage scenes](manage-scenes.md) * [Add entities](add-entities.md) -* [Manage entities](manage-entities.md) \ No newline at end of file +* [Manage entities](manage-entities.md) diff --git a/en/manual/game-studio/manage-assets.md b/en/manual/game-studio/manage-assets.md deleted file mode 100644 index a3034cfa4..000000000 --- a/en/manual/game-studio/manage-assets.md +++ /dev/null @@ -1,149 +0,0 @@ -# Manage assets - -Beginner - -This page explains how to edit and manage your assets. - -## Edit assets in the Property Grid - -You can edit most assets using the **Property Grid**. By default, this is in the top-right of Game Studio. - -For example, to change the color of a material asset:: - - 1. In the **Asset View** (in the bottom by default), select the material. - - ![Select material in the Asset View](../get-started/media/edit-asset-sphere-material-asset-view-tab.png) - - 2. In the Property Grid, under **Shading > Diffuse**, next to **Diffuse Map**, click the **colored box**, which displays the asset color (yellow in this example). - - The color picker opens. - - ![Color picker and Palette](../get-started/media/edit-asset-color-picker-palette-diffuse.png) - - 4. Select a new color for the asset. - - ![Asset is now red](../get-started/media/edit-asset-color-change-selected-asset.png) - -The **Asset Preview** (bottom right by default) displays asset changes in real time. - -The **Asset View** indicates assets with unsaved changes with asterisks (*). - -![Unsaved changes](../get-started/media/asset-unsaved-changes.png) - -## Edit assets using dedicated editors - -Game Studio has dedicated editors for the following asset types: - -* prefabs -* scenes -* sprite sheets -* UI pages -* UI libraries -* scripts - -For example, you edit scenes in the **Scene Editor**. - -![Scene Editor](media/manage-assets-scene-editor.png) - -To open the dedicated editor for these types of asset: - -* double-click the asset, or -* right-click the asset and select **Edit asset**, or -* select the asset and type **Ctrl + Enter** - -## Organize assets - -We recommend you organize your assets into subfolders by type. This makes projects much easier to manage, especially as they become large. - -![Organized project](media/manage-assets-organized-project.png) - -Assets are contained in the **Assets** folder of your project package. You can see the project in the **Solution Explorer** (by default shown in the bottom left). - -* To create a subfolder, right-click the parent folder and select **Create subfolder**. -* To move an asset, select one or more assets in the **Asset View** and drag and drop them to the folder. - -> [!NOTE] -> When you move an asset, Game Studio updates all references to other assets inside the asset. - -> [!TIP] -> To see the URL and type of an asset, move the mouse over the asset thumbnail. -> ![Details of new asset in Asset View tab](../get-started/media/asset-creation-solution-explorer.png) - -## Include assets in the build - -By default, Stride doesn't include every asset when you build the game. This is because you might not need every asset at runtime — for example, if the asset is incomplete. - -Stride only includes assets which: - -* you've specifically marked for inclusion (**root assets**), or -* are **referenced** by a root asset - -Game Studio indicates whether an asset is included with a colored icon in the top-left of the asset thumbnail. - -Color | Status -------|-------- -Blue


![Blue](media/manage-assets-reference-asset.png)


| The asset is a root asset and included in the build. -Green


![Green](media/manage-assets-include-asset.png)


| The asset is referenced by a root asset and included in the build. -Gray


![Gray](media/manage-assets-exclude-asset.png)


| The asset isn't included in the build. - -If you plan to load an asset at runtime using scripts, make it a root asset. To do this: - -* click the **gray dot** in the top-left of the thumbnail, or - -* right-click the asset and select **Include in build as root asset** - - ![Include in build as root asset](media/right-click-include-in-build-as-root-asset.png) - -## Asset View options - -To change the Asset View options, click the eye icon in the Asset View toolbar. - -![Asset View options](../get-started/media/asset-view-options.png) - -You can: - -* display assets in the selected folder only, the selected folder and subfolder -* sort assets by name, type, unsaved changes, and modification date -* switch between tile view (default) and grid view - -## Filter assets - -When browsing assets in the **Asset View** (in the bottom by default), you can filter by name, tag, type, or a combination of all three. - -The tag and name filters are "and" filters. For example, if you filter by *tag:level* and *name:knight*, the Asset View only displays assets with the tag "level" **and** the name "knight". - -Type filters are "or" filters. For example, if you filter by *type:animation* and *type:texture*, the Asset View only displays assets that are animations **or** textures. - -### Add a filter - -1. In the Asset View, type in the filter bar. - - Game Studio displays a list of matching filters (name, type, or tag). - - ![add-filter.png](media/add-filter.png) - -2. To filter by name, press **Enter**. - - To filter by a tag or type, select **tag** or **type** filters in the drop-down list. - - Game Studio applies the filter and shows matching assets in the Asset View. - -You can add multiple filters. Name filters are green, tag filters are blue, and type filters are orange. - -![filter-tags](media/filter-tags.png) - -### Toggle filters on and off - -To toggle a filter on and off without removing it, click it. Disabled filters have darker colors. - -![filter-tags](../get-started/media/disabled-filter-tags.png) - -### Remove a filter - -To remove a filter, click the X icon in the filter tag. - -## See also - -* [Create assets](create-assets.md) -* [Manage assets](manage-assets.md) -* [Use assets](use-assets.md) \ No newline at end of file diff --git a/en/manual/game-studio/prefabs/index.md b/en/manual/game-studio/prefabs/index.md index 12e3a20aa..7204fb80a 100644 --- a/en/manual/game-studio/prefabs/index.md +++ b/en/manual/game-studio/prefabs/index.md @@ -28,4 +28,4 @@ You can [override specific properties](override-prefab-properties.md) in each pr * [Nested prefabs](nested-prefabs.md) * [Override prefab properties](override-prefab-properties.md) * [Prefab models](prefab-models.md) -* [Archetypes](../archetypes.md) \ No newline at end of file +* [Archetypes](../../assets/archetypes.md) diff --git a/en/manual/game-studio/prefabs/prefab-models.md b/en/manual/game-studio/prefabs/prefab-models.md index 226c0c2a5..1feadc735 100644 --- a/en/manual/game-studio/prefabs/prefab-models.md +++ b/en/manual/game-studio/prefabs/prefab-models.md @@ -38,4 +38,4 @@ Prefab models don't expose materials. This means you can't view or edit them in * [Edit prefabs](edit-prefabs.md) * [Nested prefabs](nested-prefabs.md) * [Override prefab properties](override-prefab-properties.md) -* [Archetypes](../archetypes.md) \ No newline at end of file +* [Archetypes](../../assets/archetypes.md) diff --git a/en/manual/game-studio/use-assets.md b/en/manual/game-studio/use-assets.md deleted file mode 100644 index e0faa3d79..000000000 --- a/en/manual/game-studio/use-assets.md +++ /dev/null @@ -1,175 +0,0 @@ -# Use assets - -Beginner - -There are four ways to use assets: - -* reference them in entity components -* reference them in other assets -* load them from code as content -* load them from code as content using `UrlReference` - -## Reference assets in components - -Many kinds of component use assets. For example, model components use model assets. - -Components that use assets have **asset docks** in the **property grid**. - -![Select an asset](media/use-assets-asset-picker-dock.png) - -To add an asset to an entity component, drag the asset to the asset dock in the component properties (in the **property grid**). You can drop assets in the text field or the empty thumbnail. - -![Drag and drop an asset](media/use-assets-drag-and-drop.png) - -Alternatively, click ![Hand icon](~/manual/game-studio/media/hand-icon.png) (**Select an asset**). - -![Select an asset](media/use-assets-asset-picker.png) - -The **Select an asset** window opens. - -> [!NOTE] -> The **Select an asset** window only displays assets of types expected by the component. For example, if the component is an audio listener, the window only displays audio assets. - -After you add an asset to a component, the asset dock displays its name and a thumbnail image. - -![Asset displayed](media/asset-displayed.png) - -## Reference assets in other assets - -Assets can reference other assets. For example, a model asset might use material assets. - -You can add asset references to assets the same way you add them to entity components (see above). - -## Clear a reference - -To clear a reference to an asset, in the **asset dock**, click ![eraser](media/use-assets-eraser.png) (**Clear reference**). - -![Use eraser](media/use-eraser.png) - -## Examine references - -You can see the references in a selected asset in the **References** tab. By default, this is in the bottom right of Game Studio. - -![References tab](media/use-assets-references-tab.png) - -* The **References** tab displays the assets referenced by the selected asset. -* The **Referenced by** tab displays the assets that reference the selected asset. - -> [!Tip] -> If you can't see the References tab, make sure it's displayed under **View > References**. - -## Load assets from code - -When loading in assets at runtime we speak of "Content" rather than assets. The loaded content refers to the asset and can then be used in your script. - -```cs -// Load a model (replace URL with valid URL) -var model = Content.Load("AssetFolder/MyModel"); - -// Create a new entity to add to the scene -Entity entity = new Entity(position, "Entity Added by Script") { new ModelComponent { Model = model } }; - -// Add a new entity to the scene -SceneSystem.SceneInstance.RootScene.Entities.Add(entity); -``` - -> [!TIP] -> To find the asset URL, in Game Studio, move the mouse over the asset. Game Studio displays the asset URL in a tooltip. URLs typically have the format *AssetFolder/AssetName*. -> [!WARNING] -> When loading assets from scripts, make sure you: -> -> * include the asset in the build as described in [Manage assets](manage-assets.md) -> * make sure you add the script as a component to an entity in the scene - -### Unload unneeded assets - -When loading content from code, you should unload content when you don't need them any more. If you don't, content stays in memory, wasting GPU. - -To unload an asset, use ``Content.Unload(myAsset)``. - -## Load assets from code using UrlReference - -`UrlReference` allows you to reference assets in your scripts the same way you would with normal assets but they are loaded dynamically in code. Referencing an asset with a `UrlReference` causes the asset to be included in the build. - -You can reference assets in your scripts using properties/fields of type `UrlReference` or `UrlReference`: - -* `UrlReference` can be used to reference any asset. This is most useful for the "Raw asset". -* `UrlReference` can be used to specify the desired type. i.e. `UrlReference`. This gives Game Studio a hint about what type of asset this `UrlReference` can be used for. - -## Examples - -### Loading a Scene - -Using `UrlReference` to load the next scene. - -```cs -using System.Threading.Tasks; -//Include the Stride.Core.Serialization namespace to use UrlReference -using Stride.Core.Serialization; -using Stride.Engine; - -namespace Examples -{ - public class UrlReferenceExample : AsyncScript - { - public UrlReference NextSceneUrl { get; set; } - - public override async Task Execute() - { - //... - } - - private async Task LoadNextScene() - { - //Dynamically load next scene asynchronously - var nextScene = await Content.LoadAsync(NextSceneUrl); - SceneSystem.SceneInstance.RootScene = nextScene; - } - } -} -``` - -### Load data from a Raw asset JSON file - -Use a Raw asset to store data in a JSON file and load using [Newtonsoft.Json](https://www.newtonsoft.com/json). To use `Newtonsoft.Json` you also need to add the `Newtonsoft.Json` NuGet package to the project. - -```cs -//Include the Newtonsoft.Json namespace. -using Newtonsoft.Json; -using System.IO; -using System.Threading.Tasks; -//Include the Stride.Core.Serialization namespace to use UrlReference -using Stride.Core.Serialization; -using Stride.Engine; - -namespace Examples -{ - public class UrlReferenceExample : AsyncScript - { - public UrlReference RawAssetUrl { get; set; } - - public override async Task Execute() - { - //... - } - - private async Task LoadMyData() - { - //Open a StreamReader to read the content - using (var stream = Content.OpenAsStream(RawAssetUrl)) - using (var streamReader = new StreamReader(stream)) - { - //read the raw asset content - string json = await streamReader.ReadToEndAsync(); - //Deserialize the JSON to your custom MyDataClass Type. - return JsonConvert.DeserializeObject(json); - } - } - } -} -``` - -## See also - -* [Create assets](create-assets.md) -* [Manage assets](manage-assets.md) diff --git a/en/manual/glossary/index.md b/en/manual/glossary/index.md index 47aeb1f5a..ef312ce32 100644 --- a/en/manual/glossary/index.md +++ b/en/manual/glossary/index.md @@ -22,8 +22,8 @@ ## Asset terms -- [Archetype](../game-studio/archetypes.md): A template for asset properties that other assets can inherit from. -- [Asset](../game-studio/assets.md): Content used by the game (models, textures, materials, scripts, etc.) managed by the asset pipeline. +- [Archetype](../assets/archetypes.md): A template for asset properties that other assets can inherit from. +- [Asset](../assets/index.md): Content used by the game (models, textures, materials, scripts, etc.) managed by the asset pipeline. - Asset URL: The path used in code to load an asset, for example with `Content.Load("MyFolder/MyAsset")`. See [Create a model from code](../scripts/create-a-model-from-code.md) and [Create a script](../scripts/create-a-script.md). - [Asset compilation](../assets/asset-compilation.md): Compiles assets into runtime-ready formats. - [Asset bundles](../assets/asset-bundles.md): Groups of assets packaged for deployment/streaming. @@ -50,9 +50,9 @@ ## Editor terms - [Add entities](../game-studio/add-entities.md): Create new entities in a scene. -- [Archetypes](../game-studio/archetypes.md): Share default properties across assets. -- [Asset View](../game-studio/assets.md): Panel used to manage assets in your project. -- [Create assets](../game-studio/create-assets.md): Create and organize project assets. +- [Archetypes](../assets/archetypes.md): Share default properties across assets. +- [Asset View](../assets/index.md): Panel used to manage assets in your project. +- [Create assets](../assets/create-an-asset.md): Create and organize project assets. - [Game settings](../game-studio/game-settings.md): Project-wide defaults such as the graphics compositor and rendering options. - [Graphics compositor editor](../graphics/graphics-compositor/index.md): Node-based editor to configure the rendering pipeline. - [Manage entities](../game-studio/manage-entities.md): Select, group, and organize entities. @@ -61,7 +61,7 @@ - [Property Grid](../game-studio/index.md): Panel used to view and edit properties of selected entities/components. - [Scene Editor](../game-studio/scenes.md): The 3D/2D viewport for arranging entities in a scene. - [Splash screen](../game-studio/splash-screen.md): Configure startup visuals. -- [Use assets](../game-studio/use-assets.md): Reference and place assets in scenes. +- [Use assets](../assets/use-an-asset.md): Reference and place assets in scenes. - [World units](../game-studio/world-units.md): Scene scale conventions (unit size, conversions). ## General terms diff --git a/en/manual/scripts/create-a-model-from-code.md b/en/manual/scripts/create-a-model-from-code.md index 3cb087d69..3346854a7 100644 --- a/en/manual/scripts/create-a-model-from-code.md +++ b/en/manual/scripts/create-a-model-from-code.md @@ -40,7 +40,7 @@ You can create models in scripts at runtime. You can do this in several differen ![Include in build as root asset](media/create-model-from-code-include-in-build-as-root-asset.png) - This makes sure the asset is available for the script to use at runtime. For more information, see [Manage assets](../game-studio/manage-assets.md). + This makes sure the asset is available for the script to use at runtime. For more information, see the [asset compilation page](../assets/asset-compilation.md). ## Create a procedural model @@ -137,7 +137,7 @@ Finally, you need to give the model one or more materials. There are two ways to ![Include in build as root asset](media/create-model-from-code-include-material-in-build-as-root-asset.png) - This makes sure the asset is available for the script to use at runtime. For more information, see [Manage assets](../game-studio/manage-assets.md). + This makes sure the asset is available for the script to use at runtime. For more information, see the [use an asset in code page](../assets/use-an-asset-in-code.md). ### Option 2: Create new materials in code diff --git a/en/manual/sprites/import-sprite-sheets.md b/en/manual/sprites/import-sprite-sheets.md index 0028af29e..c7c4cba59 100644 --- a/en/manual/sprites/import-sprite-sheets.md +++ b/en/manual/sprites/import-sprite-sheets.md @@ -30,4 +30,4 @@ You can import sprite sheets (image files containing sprites) just like any othe * [Edit sprites](edit-sprites.md) * [Use sprites](use-sprites.md) -* [Assets](../game-studio/assets.md) +* [Assets](../assets/index.md) diff --git a/en/manual/stride-for-godot-developers/index.md b/en/manual/stride-for-godot-developers/index.md index e0aea0933..59679c11c 100644 --- a/en/manual/stride-for-godot-developers/index.md +++ b/en/manual/stride-for-godot-developers/index.md @@ -202,7 +202,7 @@ Like Godot, Stride supports file formats including: | Fonts | .ttf, .otf | | Video | .mp4 -For more information about assets, see [Assets](../game-studio/assets.md). +For more information about assets, see [Assets](../assets/index.md). ## Prefab inheritance diff --git a/en/manual/stride-for-unity-developers/index.md b/en/manual/stride-for-unity-developers/index.md index 6119255cd..86d35a22b 100644 --- a/en/manual/stride-for-unity-developers/index.md +++ b/en/manual/stride-for-unity-developers/index.md @@ -223,7 +223,7 @@ Like Unity®, Stride supports file formats including: | Fonts | `.ttf`, `.otf` | | Video | `.mp4` | -For more information about assets, see [Assets](../game-studio/assets.md). +For more information about assets, see [Assets](../assets/index.md). ## Prefabs @@ -255,7 +255,7 @@ Archetype Derived asset ``` -For more information about archetypes, see [Archetypes](../game-studio/archetypes.md). +For more information about archetypes, see [Archetypes](../assets/archetypes.md). ## Object lifetime diff --git a/en/manual/toc.yml b/en/manual/toc.yml index c67ed6f7b..d91ca9307 100644 --- a/en/manual/toc.yml +++ b/en/manual/toc.yml @@ -146,17 +146,6 @@ items: href: game-studio/add-entities.md - name: Manage entities href: game-studio/manage-entities.md - - name: Assets - href: game-studio/assets.md - items: - - name: Create assets - href: game-studio/create-assets.md - - name: Manage assets - href: game-studio/manage-assets.md - - name: Use assets - href: game-studio/use-assets.md - - name: Archetypes - href: game-studio/archetypes.md - name: Prefabs href: game-studio/prefabs/index.md items: diff --git a/en/manual/video/set-up-a-video.md b/en/manual/video/set-up-a-video.md index a1a837236..52bc90199 100644 --- a/en/manual/video/set-up-a-video.md +++ b/en/manual/video/set-up-a-video.md @@ -18,7 +18,7 @@ ## 1. Add a video asset -Before you can use a video in your game, you need to import it as an [asset](../game-studio/assets.md). +Before you can use a video in your game, you need to import it as an [asset](../assets/index.md). 1. Drag the video file from **Explorer** into the **Asset View**. @@ -122,4 +122,4 @@ myVideoComponent.Instance.Play(); ## See also -* [Video properties](video-properties.md) \ No newline at end of file +* [Video properties](video-properties.md) diff --git a/en/tutorials/csharpbeginner/loading-content.md b/en/tutorials/csharpbeginner/loading-content.md index 36fbd46db..1e83e7908 100644 --- a/en/tutorials/csharpbeginner/loading-content.md +++ b/en/tutorials/csharpbeginner/loading-content.md @@ -6,7 +6,7 @@ This C# Beginner tutorial covers how to load content from code. Assets like models, textures, sound etc can be loaded from during runtime. At that point we no longer speak of assets but of 'content'. -This tutorial specifically loads content of the `Model` type. Loaded content that is no longer required in your scene, should be unloaded again so save up memory. For more information on assets see [Manage assets](../../manual/game-studio/manage-assets.md). +This tutorial specifically loads content of the `Model` type. Loaded content that is no longer required in your scene, should be unloaded again so save up memory. For more information on assets see the [use an asset in code page](../../manual/assets/use-an-asset-in-code.md). ![Loading content](media/loading-content.webp) From ce6a47d8d50bfa29db24925197f65f0d3f97ab68 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Thu, 7 May 2026 15:03:50 +0200 Subject: [PATCH 11/22] Added redirects --- en/manual/engine/assets/asset-bundles.md | 3 +++ en/manual/engine/assets/asset-control.md | 3 +++ en/manual/engine/assets/index.md | 3 +++ en/manual/game-studio/archetypes.md | 3 +++ en/manual/game-studio/assets.md | 3 +++ en/manual/game-studio/create-assets.md | 3 +++ en/manual/game-studio/manage-assets.md | 3 +++ en/manual/game-studio/use-assets.md | 3 +++ 8 files changed, 24 insertions(+) create mode 100644 en/manual/engine/assets/asset-bundles.md create mode 100644 en/manual/engine/assets/asset-control.md create mode 100644 en/manual/engine/assets/index.md create mode 100644 en/manual/game-studio/archetypes.md create mode 100644 en/manual/game-studio/assets.md create mode 100644 en/manual/game-studio/create-assets.md create mode 100644 en/manual/game-studio/manage-assets.md create mode 100644 en/manual/game-studio/use-assets.md diff --git a/en/manual/engine/assets/asset-bundles.md b/en/manual/engine/assets/asset-bundles.md new file mode 100644 index 000000000..aa09001bc --- /dev/null +++ b/en/manual/engine/assets/asset-bundles.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../../assets/asset-bundles.html +--- diff --git a/en/manual/engine/assets/asset-control.md b/en/manual/engine/assets/asset-control.md new file mode 100644 index 000000000..b8b0dc538 --- /dev/null +++ b/en/manual/engine/assets/asset-control.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../../assets/asset-compilation.html +--- diff --git a/en/manual/engine/assets/index.md b/en/manual/engine/assets/index.md new file mode 100644 index 000000000..88f29c3a6 --- /dev/null +++ b/en/manual/engine/assets/index.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../../assets/index.html +--- diff --git a/en/manual/game-studio/archetypes.md b/en/manual/game-studio/archetypes.md new file mode 100644 index 000000000..72e8a4d6e --- /dev/null +++ b/en/manual/game-studio/archetypes.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../assets/archetypes.html +--- diff --git a/en/manual/game-studio/assets.md b/en/manual/game-studio/assets.md new file mode 100644 index 000000000..bd0c9991e --- /dev/null +++ b/en/manual/game-studio/assets.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../assets/index.html +--- diff --git a/en/manual/game-studio/create-assets.md b/en/manual/game-studio/create-assets.md new file mode 100644 index 000000000..7b1277a97 --- /dev/null +++ b/en/manual/game-studio/create-assets.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../assets/create-an-asset.html +--- diff --git a/en/manual/game-studio/manage-assets.md b/en/manual/game-studio/manage-assets.md new file mode 100644 index 000000000..a76c6a412 --- /dev/null +++ b/en/manual/game-studio/manage-assets.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../assets/asset-compilation.html +--- diff --git a/en/manual/game-studio/use-assets.md b/en/manual/game-studio/use-assets.md new file mode 100644 index 000000000..44e0cb33c --- /dev/null +++ b/en/manual/game-studio/use-assets.md @@ -0,0 +1,3 @@ +--- +redirect_url: ../assets/use-an-asset.html +--- From 15345292ca7bf19feb5a48abd5cf9e01bd8c614b Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sat, 9 May 2026 10:13:34 +0200 Subject: [PATCH 12/22] Use an asset from code improvements --- en/manual/assets/use-an-asset-in-code.md | 71 ++++++++++++------------ 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md index 4c8c0b07b..473842a77 100644 --- a/en/manual/assets/use-an-asset-in-code.md +++ b/en/manual/assets/use-an-asset-in-code.md @@ -3,12 +3,12 @@ There are a few ways of using assets in code: * [**Referencing**](#referencing-an-asset) - the easiest way, creates an assignable reference in the **property grid**. -* [**Loading from path**](#loading-from-path) - a manual way of loading assets based on their path. You also have to make sure the assets are included in the build and to unload them when you're done using them. -* [**Url reference**](#url-reference) - a mix between referencing and loading from path. It creates an assignable reference in the **property grid**, while allowing you to manually handle loading and unloading. +* [**Url reference**](#url-reference) - creates an assignable reference in the **property grid**, while allowing you to manually handle loading and unloading of the asset. +* [**Loading from path**](#loading-from-path) - a manual way of loading assets based on their path. You also have to make sure the assets are included in the build and to unload them. ## Referencing an asset -The easiest way of using an asset in your own script is to create a assignable reference using a public property or field. +The easiest way of using an asset in your own script is to **create an assignable reference** using a public property or field. ```csharp public class Example : StartupScript @@ -19,68 +19,71 @@ public class Example : StartupScript The above will show up in the **property grid** like so: -![](media/property-grid-direct-reference-example.webp) +![Image of the script in the property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-direct-reference-example.webp) -Stride will then automatically handle assigning and manage the reference count. However, if you want more control, consider using a [url reference](#url-reference) instead. +Stride will automatically handle loading and unloading. If you want more control over how assets are loaded, consider using a [url reference](#url-reference) instead. -## Loading from path +## Url reference -> [!WARNING] -> When assets are loaded manually, **they have to be manually unloaded too**, or else Stride will keep the assets **loaded in memory forever**. +**Url references** provide a way of assigning an asset in the property grid **without loading it**. -You can load assets at runtime through code using [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) and then unload them using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). +You can create an assignable url reference to an asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. ```csharp -public override void Start() +public class Example : StartupScript { - var loadedModel = Content.Load("path/to/asset"); -} - -public override void Cancel() -{ - Content.Unload("path/to/asset"); + public UrlReference MyAssetReference { get; set; } } ``` -### Missing assets - -The asset compiler only knows which assets to include based on their references. When loading assets only from a path, **Stride doesn't know that the asset is needed in the build**. - -To fix that, you can [include the missing assets as root](asset-compilation.md#how-to-mark-an-asset-as-root) to make sure they are always included with the build, or try using [url references](#url-reference) instead. - -## Url reference - -Url references provide a way of assigning an asset in the property grid **without loading it**. +It will show up in the **property grid** like so: -Unlike [loading from path](#loading-from-path), the references asset will be included in the build, as Stride will see it as needed by the component. +![Image of the script in the property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-url-reference-example.webp) -You can create an assignable url reference to an asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. +You can retrieve the asset through code via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). ```csharp -public class Example : StartupScript +public override void Start() { - public UrlReference MyAssetReference { get; set; } + var asset = Content.Load(MyAssetReference); +} + +public override void Cancel() +{ + var asset = Content.Unload(MyAssetReference); } ``` -It will show up in the **property grid** like so: +> [!WARNING] +> When assets are loaded manually, **they have to be manually unloaded too**, or else Stride will keep the assets **loaded in memory forever**. -![](media/property-grid-url-reference-example.webp) +## Loading from path -You can retrieve the asset through code via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). +Assets can also be loaded based on their path in the Assets folder directly through code, **without having to assign anything**. + +You can load assets at runtime through code using [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) and then unload them using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). ```csharp public override void Start() { - var asset = Content.Load(MyAssetReference); + var loadedModel = Content.Load("path/to/asset"); } public override void Cancel() { - var asset = Content.Unload(MyAssetReference); + Content.Unload("path/to/asset"); } ``` +> [!WARNING] +> When assets are loaded manually, **they have to be manually unloaded too**, or else Stride will keep the assets **loaded in memory forever**. + +### Missing assets + +The asset compiler only knows which assets to include in the build based on their references. When loading assets only from a path, **Stride doesn't know that the asset is needed**. + +To fix that, you can [mark the missing assets as root](asset-compilation.md#how-to-mark-an-asset-as-root) to make sure they are always included with the build, or try using [url references](#url-reference) instead. + ## See also * [Use an asset](use-an-asset.md) From 712b59eca38e57f8ac5f4d3402f5cc53e4c77320 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sat, 9 May 2026 10:17:20 +0200 Subject: [PATCH 13/22] Minor fixes --- en/manual/assets/archetypes.md | 8 ++++---- en/manual/assets/asset-compilation.md | 4 ++-- en/manual/assets/create-an-asset.md | 6 +++--- en/manual/assets/edit-an-asset.md | 4 ++-- en/manual/assets/index.md | 2 +- en/manual/assets/tags.md | 4 ++-- en/manual/assets/use-an-asset-in-code.md | 14 +++++++------- en/manual/assets/use-an-asset.md | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md index 6600da591..f6a2e423c 100644 --- a/en/manual/assets/archetypes.md +++ b/en/manual/assets/archetypes.md @@ -11,7 +11,7 @@ Here is some terminology to keep in mind: ## Creating a derived asset -In the **asset view**, right click on the asset you want to derive from and select **Create derived asset**. +In the **Asset view**, right click on the asset you want to derive from and select **Create derived asset**. ![](media/asset-view-create-derived.webp) @@ -19,7 +19,7 @@ In the **asset view**, right click on the asset you want to derive from and sele ## Overriding values -When changing a property of a derived asset in the **property grid**, it will be marked as an overridden. Overridden properties are slightly brighter and bolder. +When changing a property of a derived asset in the **Property grid**, it will be marked as an overridden. Overridden properties are slightly brighter and bolder. ![](media/property-grid-overriden-property.webp) @@ -27,11 +27,11 @@ Override properties will not be updated when they are changed on the archetype. ## Reverting overrides -In case you want to revert a property to use the same values as the archetype, right click on it in the **property grid** and select **Reset to base value**. +In case you want to revert a property to use the same values as the archetype, right click on it in the **Property grid** and select **Reset to base value**. ## Unlink from archetype -If you want to turn a derived asset into a normal one (unlinking it from the archetype), in the **asset view** right click on it and select **Clear archetype**. +If you want to turn a derived asset into a normal one (unlinking it from the archetype), in the **Asset view** right click on it and select **Clear archetype**. ![](media/property-grid-reset-to-base.webp) diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index 658e04cfc..5369000cf 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -10,7 +10,7 @@ TODO: VISUALIZATION ## Blue, green and gray dots -In the **asset view**, you can see a dot in the top left corner that signifies how an asset will be compiled. +In the **Asset view**, you can see a dot in the top left corner that signifies how an asset will be compiled. ![](media/asset-view-indicators.webp) @@ -31,7 +31,7 @@ A few remarks: ### How to mark an asset as root -You can mark an asset as root by right clicking on it in the **asset view** and selecting **🔵 Mark as root**. +You can mark an asset as root by right clicking on it in the **Asset view** and selecting **🔵 Mark as root**. ![](media/asset-view-include-root.webp) diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index 180124f26..1f432a416 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -1,10 +1,10 @@ # Create an asset -Assets can be created with **Game Studio** in the **asset view**. +Assets can be created with **Game Studio** in the **Asset view**. ## Create an asset -1. In the **asset view**, click the **Add assets** button. +1. In the **Asset view**, click the **Add assets** button. ![](media/asset-view-add-asset.webp) @@ -14,7 +14,7 @@ Assets can be created with **Game Studio** in the **asset view**. ## Create an asset from resource -To create an asset from a resource, simply drag and drop it into the **asset view** and select the type of resource you want to create. +To create an asset from a resource, simply drag and drop it into the **Asset view** and select the type of resource you want to create. ![](media/asset-view-from-resource-type.webp) diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index cb368e7af..5324fe52f 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -2,9 +2,9 @@ Assets can be edited in **Game Studio**. -## Editing in property grid +## Editing in Property grid -When you select an asset in the **asset view**, it's properties will show up in the **property grid**. +When you select an asset in the **Asset view**, it's properties will show up in the **Property grid**. ![](media/property-grid-asset-properties.webp) diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index 30efc54ef..25c8dc0ad 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -10,7 +10,7 @@ In short: ## Location of assets and resources -In **Game Studio** you can view assets in the **asset view** by selecting an **assets** folder in the **solution explorer**. +In **Game Studio** you can view assets in the **Asset view** by selecting an **assets** folder in the **solution explorer**. ![](media/solution-explorer-assets.webp) diff --git a/en/manual/assets/tags.md b/en/manual/assets/tags.md index 640ecd13a..f1c86d5ba 100644 --- a/en/manual/assets/tags.md +++ b/en/manual/assets/tags.md @@ -2,11 +2,11 @@ Assets can be tagged to help search for them more easily, or to organize them in [asset bundles](asset-bundles.md). -Tags aren't available at runtime. They are only used as a tool in **Game Studio** and during asset compilation. +Tags aren't available at runtime. They are only used as a tool in **Game Studio** and in compilation for [asset bundles](asset-bundles.md). ## Add or remove a tag -An asset's tags are displayed at the top of the **property grid**. +An asset's tags are displayed at the top of the **Property grid**. ![](media/property-grid-tags.webp) diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md index 473842a77..68b32a313 100644 --- a/en/manual/assets/use-an-asset-in-code.md +++ b/en/manual/assets/use-an-asset-in-code.md @@ -2,8 +2,8 @@ There are a few ways of using assets in code: -* [**Referencing**](#referencing-an-asset) - the easiest way, creates an assignable reference in the **property grid**. -* [**Url reference**](#url-reference) - creates an assignable reference in the **property grid**, while allowing you to manually handle loading and unloading of the asset. +* [**Referencing**](#referencing-an-asset) - the easiest way, creates an assignable reference in the **Property grid**. +* [**Url reference**](#url-reference) - creates an assignable reference in the **Property grid**, while allowing you to manually handle loading and unloading of the asset. * [**Loading from path**](#loading-from-path) - a manual way of loading assets based on their path. You also have to make sure the assets are included in the build and to unload them. ## Referencing an asset @@ -17,15 +17,15 @@ public class Example : StartupScript } ``` -The above will show up in the **property grid** like so: +The above will show up in the **Property grid** like so: -![Image of the script in the property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-direct-reference-example.webp) +![Image of the script in the Property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-direct-reference-example.webp) Stride will automatically handle loading and unloading. If you want more control over how assets are loaded, consider using a [url reference](#url-reference) instead. ## Url reference -**Url references** provide a way of assigning an asset in the property grid **without loading it**. +**Url references** provide a way of assigning an asset in the Property grid **without loading it**. You can create an assignable url reference to an asset in your own script by using [`UrlReference`](xref:Stride.Core.Serialization.UrlReference`1), where `T` is the asset type you want to use. @@ -36,9 +36,9 @@ public class Example : StartupScript } ``` -It will show up in the **property grid** like so: +It will show up in the **Property grid** like so: -![Image of the script in the property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-url-reference-example.webp) +![Image of the script in the Property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-url-reference-example.webp) You can retrieve the asset through code via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index e46653d9f..5bd793b1b 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -4,7 +4,7 @@ Assets can be referenced by other assets or components in a scene. ## Components and other assets -In the **property grid**, you can sometimes find a property that looks like this: +In the **Property grid**, you can sometimes find a property that looks like this: ![](media/property-grid-asset-reference.webp) @@ -14,7 +14,7 @@ In here, you can assign a reference to another asset. There are two available bu * **Eraser** - clears the reference. > [!TIP] -> You can also **drag and drop** an asset from the **asset view**. +> You can also **drag and drop** an asset from the **Asset view**. > > ![](media/property-grid-asset-reference-drag-and-drop.webp) @@ -26,7 +26,7 @@ You can create an assignable reference to an asset in your script by creating a public Model ModelAsset { get; set; } ``` -This will show up in the **property grid** like so. +This will show up in the **Property grid** like so. ![](media/property-grid-direct-reference-example.webp) From cd8da15f2ec8b38914a86cdead35aa9fb18d0024 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sat, 9 May 2026 10:53:25 +0200 Subject: [PATCH 14/22] Minor fixes --- en/manual/assets/asset-bundles.md | 6 ++---- en/manual/assets/create-an-asset.md | 2 +- en/manual/assets/edit-an-asset.md | 9 ++++++--- en/manual/assets/index.md | 2 +- en/manual/assets/tags.md | 4 ++-- en/manual/assets/use-an-asset-in-code.md | 4 ++-- en/manual/assets/use-an-asset.md | 2 +- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index f18e24339..6fdf506bd 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -62,8 +62,6 @@ Stride tries to place assets in the most appropriate bundle. 2. If an asset is selected by **BundleA** and **BundleB**, but **BundleB** has a dependency on **BundleA**, that asset is placed only in **BundleA**. 3. If an asset is selected by **BundleA** and **BundleB** and both of them aren't dependent on each other, that asset is placed in both of them. -TODO: VISUALIZATION - > [!NOTE] > Loading two bundles with the same asset won't result in a duplicate. @@ -84,12 +82,12 @@ Assets can then be loaded via the **content system**. For more information, visi Bundles are located in `data/db/bundles` next to the built executable. You can recognize them by their name. +For more information about the build location, visit the [build file structure page](../files-and-folders/building-the-game/build-file-structure.md). + TODO: VISUALIZATION > [!NOTE] > Bundles tend to be split into multiple files that start with the same name. -> -> TODO: VISUALIZATION (WHY NOT) ## See also diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index 1f432a416..23f9539ac 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -4,7 +4,7 @@ Assets can be created with **Game Studio** in the **Asset view**. ## Create an asset -1. In the **Asset view**, click the **Add assets** button. +1. In the **Asset view**, click the **➕ Add assets** button. ![](media/asset-view-add-asset.webp) diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 5324fe52f..2f1390f53 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -1,6 +1,8 @@ # Edit an asset -Assets can be edited in **Game Studio**. +Assets can be edited with **Game Studio**. + +Most assets are just a simple list of properties, which can be edited in the **Property grid**. However, more complex assets (such as scenes) require the use of a **dedicated editor**. ## Editing in Property grid @@ -12,7 +14,8 @@ Your changes will be reflected in the **asset preview** in real time. ![](media/asset-preview.webp) -Modified assets aren't automatically saved. You will have to save them manually by going to **File > Save** or by pressing **Ctrl + S**. +> [!NOTE] +> Modified assets aren't automatically saved. You will have to save them manually by going to **File > Save** or by pressing **Ctrl + S**. ## Editing using a dedicated editor @@ -28,7 +31,7 @@ Currently, the assets that have a dedicated editor are: * Ui libraries * Scripts -To open a dedicated editor for an asset simply **double click it**, right click and select **Edit asset** or select it and press **Ctrl + Enter**. +To open a dedicated editor for an asset either **double click it**, right click and select **🖉 Edit asset** or select it and press **Ctrl + Enter**. ![](media/asset-view-edit-asset.webp) diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index 25c8dc0ad..5bdeee2cc 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -6,7 +6,7 @@ In short: * **Resources** - raw data files (`.png`, `.wav`, `.fbx`) -* **Assets** - an element that can be used in a game. They can use resource files and contain additional properties. +* **Assets** - usable elements in the game. They can use resource files and contain additional properties. ## Location of assets and resources diff --git a/en/manual/assets/tags.md b/en/manual/assets/tags.md index f1c86d5ba..2ceeeb6a1 100644 --- a/en/manual/assets/tags.md +++ b/en/manual/assets/tags.md @@ -1,8 +1,8 @@ # Tags -Assets can be tagged to help search for them more easily, or to organize them in [asset bundles](asset-bundles.md). +Assets can be tagged to help with searching and to organize them in [asset bundles](asset-bundles.md). -Tags aren't available at runtime. They are only used as a tool in **Game Studio** and in compilation for [asset bundles](asset-bundles.md). +Tags aren't available at runtime. They are only used as a tool in **Game Studio** and during compilation in [asset bundles](asset-bundles.md). ## Add or remove a tag diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md index 68b32a313..204dd0b49 100644 --- a/en/manual/assets/use-an-asset-in-code.md +++ b/en/manual/assets/use-an-asset-in-code.md @@ -40,7 +40,7 @@ It will show up in the **Property grid** like so: ![Image of the script in the Property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-url-reference-example.webp) -You can retrieve the asset through code via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). +The asset can be retrieved via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). ```csharp public override void Start() @@ -61,7 +61,7 @@ public override void Cancel() Assets can also be loaded based on their path in the Assets folder directly through code, **without having to assign anything**. -You can load assets at runtime through code using [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) and then unload them using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). +Assets can be loaded via the **content system** using [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) and then unloaded using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). ```csharp public override void Start() diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index 5bd793b1b..d89735630 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -10,7 +10,7 @@ In the **Property grid**, you can sometimes find a property that looks like this In here, you can assign a reference to another asset. There are two available buttons: -* 👆 **Hand** - opens up a dialogue to select an existing asset. +* **Hand** - opens up a dialogue to select an existing asset. * **Eraser** - clears the reference. > [!TIP] From cd14d866fe35cb3fc1d7696f56b33baa359471ed Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sat, 9 May 2026 11:08:58 +0200 Subject: [PATCH 15/22] Updated asset info in the get-started pages --- en/manual/assets/asset-compilation.md | 2 +- en/manual/assets/create-an-asset.md | 10 +++----- en/manual/assets/index.md | 2 +- .../assets/media/asset-view-add-asset.webp | 3 --- en/manual/get-started/assets.md | 25 ++++++++++--------- 5 files changed, 18 insertions(+), 24 deletions(-) delete mode 100644 en/manual/assets/media/asset-view-add-asset.webp diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index 5369000cf..5a058d871 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -31,7 +31,7 @@ A few remarks: ### How to mark an asset as root -You can mark an asset as root by right clicking on it in the **Asset view** and selecting **🔵 Mark as root**. +You can mark an asset as root by right clicking on it in the **Asset view** and selecting **🔵 Include in build as root asset**. ![](media/asset-view-include-root.webp) diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index 23f9539ac..ec1a8980f 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -4,17 +4,13 @@ Assets can be created with **Game Studio** in the **Asset view**. ## Create an asset -1. In the **Asset view**, click the **➕ Add assets** button. +To create an asset, click the **➕ Add assets** button in the **Asset view** and select the type of asset you want to create. - ![](media/asset-view-add-asset.webp) - -2. Select the type of asset you want to create. - - ![](media/asset-view-create-new.webp) +![](media/asset-view-create-new.webp) ## Create an asset from resource -To create an asset from a resource, simply drag and drop it into the **Asset view** and select the type of resource you want to create. +To create an asset from a resource, simply drag and drop it into the **Asset view** and select the type of asset you want to create. ![](media/asset-view-from-resource-type.webp) diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index 5bdeee2cc..fa25ad242 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -2,7 +2,7 @@ **Assets** are representations of elements in a project (such as scenes, textures or audio), which can be used by scripts or other assets. An example would be the **model component** using a **model asset**. -**Resources** on the other hand are the files containing actual data (such as images or music), which can then be used by assets. +**Resources** on the other hand are the files containing actual data (such as images or music), which can be used by assets. In short: * **Resources** - raw data files (`.png`, `.wav`, `.fbx`) diff --git a/en/manual/assets/media/asset-view-add-asset.webp b/en/manual/assets/media/asset-view-add-asset.webp deleted file mode 100644 index 8d23208bf..000000000 --- a/en/manual/assets/media/asset-view-add-asset.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c71ec937664037bcded8c9f355512e3d10801fda66a3ad9f26450a0ac989aa72 -size 3362 diff --git a/en/manual/get-started/assets.md b/en/manual/get-started/assets.md index 09b864b5b..1cdb50313 100644 --- a/en/manual/get-started/assets.md +++ b/en/manual/get-started/assets.md @@ -6,36 +6,37 @@ An asset is a representation of an element of your game inside Game Studio, such ## Create an asset -To create an asset, click the "Add Asset" button in the **Asset View** and select the type of asset you want to create. +To create an asset, click the **➕ Add assets** button in the **Asset view** and select the type of asset you want to create. ![](../assets/media/asset-view-create-new.webp) ## Create assets from resources -To create an asset from a resource, simply drag and drop it from a folder. - -Then, select the type of resource you want to create. +To create an asset from a resource, simply drag and drop it into the **Asset view** and select the type of asset you want to create. ![](../assets/media/asset-view-from-resource-type.webp) -You will be asked, if you want to **copy the dragged file to the resources folder**. Most of the time, **you want to do this**, in order to make the project easier to share and use version control with. +If the resource isn't present in the resources folder, **Game Studio** will ask you if you want to move it there. In the majority of cases, **you will want to click yes**. ![](../assets/media/asset-view-copy-resource.webp) -Finally, you will be asked if you want to **move it to the default location**. Again, most of the time **you want to do this**, unless you need more control over where resources end up. +Finally, you will be asked if you want to **move it to the default location**. Again, most of the time **you will want to do this**, unless you need more control over where resources end up. ![](../assets/media/asset-view-resource-default-location.webp) -## Green, blue and gray dots +## Blue, green and gray dots + +In the **Asset view**, you can see a dot in the top left corner that signifies how an asset will be compiled. ![](../assets/media/asset-view-indicators.webp) -Every asset has a little dot in the top left corner of their icon. This dot indicates if an asset is going to be included when building the project: -* **Blue** - the asset will be included in the build no matter if it's needed or not. -* **Green** - the asset will be included in the build, because a different asset needs it. -* **Gray** - the asset will not be included in the build. +Each color represents something: + +* 🔵 **Blue** (will be compiled) - this asset is marked as root, meaning that it will always be compiled in the game no matter if it's referenced or not. +* 🟢 **Green** (will be compiled) - this asset is referenced by another asset that is used in the game, meaning that it will be compiled. +* ⚫ **Gray** (won't be compiled) - this asset isn't referenced by any other asset that's used in the game, meaning that it won't be compiled. -Stride doesn't include assets which aren't used anywhere, meaning that **they cannot be accessed when running the game**. In order to ensure, that an asset will always be included in the build, right click on it and select **Include in build as root asset**. +Stride doesn't include assets which aren't used anywhere, meaning that **they cannot be accessed when running the game**. In order to ensure, that an asset will always be included in the build, right click on it and select **🔵 Include in build as root asset**. ![](../assets/media/asset-view-include-root.webp) From c5151d4b36bad623f7d3479f79656feb585668cd Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sat, 9 May 2026 11:14:11 +0200 Subject: [PATCH 16/22] Added badges --- en/manual/assets/archetypes.md | 2 ++ en/manual/assets/asset-bundles.md | 3 +++ en/manual/assets/asset-compilation.md | 2 ++ en/manual/assets/create-an-asset.md | 2 ++ en/manual/assets/edit-an-asset.md | 2 ++ en/manual/assets/index.md | 2 ++ en/manual/assets/tags.md | 2 ++ en/manual/assets/use-an-asset-in-code.md | 3 +++ en/manual/assets/use-an-asset.md | 2 ++ 9 files changed, 20 insertions(+) diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md index f6a2e423c..06988d86e 100644 --- a/en/manual/assets/archetypes.md +++ b/en/manual/assets/archetypes.md @@ -1,5 +1,7 @@ # Archetypes +Intermediate + Stride allows you to create variants of the same asset that only change a selected number of properties, while remaining synchronized with the base. TODO: IMAGE OR VISUALIZATION diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index 6fdf506bd..1abafee2e 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -1,5 +1,8 @@ # Asset bundles +Advanced +Programmer + After compilation, assets are turned into **asset bundles**. By default, only one asset bundle is created, but this can be changed in order to, for example: separate DLC content into it's own bundle, so that it could be sold separately. When the game starts, Stride only loads the `default` bundle. Other bundles need to be loaded manually through code. diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index 5a058d871..abb9d7f38 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -1,5 +1,7 @@ # Asset compilation +Beginner + Assets are compiled into **bundles**. ## Which assets are compiled diff --git a/en/manual/assets/create-an-asset.md b/en/manual/assets/create-an-asset.md index ec1a8980f..c4482585e 100644 --- a/en/manual/assets/create-an-asset.md +++ b/en/manual/assets/create-an-asset.md @@ -1,5 +1,7 @@ # Create an asset +Beginner + Assets can be created with **Game Studio** in the **Asset view**. ## Create an asset diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 2f1390f53..5c850ef73 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -1,5 +1,7 @@ # Edit an asset +Beginner + Assets can be edited with **Game Studio**. Most assets are just a simple list of properties, which can be edited in the **Property grid**. However, more complex assets (such as scenes) require the use of a **dedicated editor**. diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index fa25ad242..050adcdad 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -1,5 +1,7 @@ # Assets +Beginner + **Assets** are representations of elements in a project (such as scenes, textures or audio), which can be used by scripts or other assets. An example would be the **model component** using a **model asset**. **Resources** on the other hand are the files containing actual data (such as images or music), which can be used by assets. diff --git a/en/manual/assets/tags.md b/en/manual/assets/tags.md index 2ceeeb6a1..45473de43 100644 --- a/en/manual/assets/tags.md +++ b/en/manual/assets/tags.md @@ -1,5 +1,7 @@ # Tags +Beginner + Assets can be tagged to help with searching and to organize them in [asset bundles](asset-bundles.md). Tags aren't available at runtime. They are only used as a tool in **Game Studio** and during compilation in [asset bundles](asset-bundles.md). diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md index 204dd0b49..92ec4d640 100644 --- a/en/manual/assets/use-an-asset-in-code.md +++ b/en/manual/assets/use-an-asset-in-code.md @@ -1,5 +1,8 @@ # Use an asset in code +Beginner +Programmer + There are a few ways of using assets in code: * [**Referencing**](#referencing-an-asset) - the easiest way, creates an assignable reference in the **Property grid**. diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index d89735630..2523f5263 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -1,5 +1,7 @@ # Use an asset +Beginner + Assets can be referenced by other assets or components in a scene. ## Components and other assets From d049672da22fbe42c310c8806966159fdc3ea5c3 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sun, 10 May 2026 12:53:34 +0200 Subject: [PATCH 17/22] Added api link to Load Bundle --- en/manual/assets/asset-bundles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index 1abafee2e..f8d65de0c 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -70,7 +70,7 @@ Stride tries to place assets in the most appropriate bundle. ## Loading bundles -Stride **automatically loads the default bundle**. However, other bundles need to be manually loaded through code. +Stride **automatically loads the default bundle**. However, other bundles need to be manually loaded through code using [`LoadBundle`](xref:Stride.Core.Storage.ObjectDatabase.LoadBundle*). ```csharp await Content.FileProvider.ObjectDatabase.LoadBundle("NameOfBundle"); From b7f5c354e75bd105749f1a38ff459da9c605cb4d Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sun, 10 May 2026 19:08:05 +0200 Subject: [PATCH 18/22] Added most visualizations --- en/manual/assets/archetypes.md | 6 +++--- en/manual/assets/asset-bundles.md | 2 +- en/manual/assets/media/archetypes.svg | 3 +++ en/manual/assets/media/archetypes.webp | 3 +++ en/manual/assets/media/asset-bundle-location.svg | 3 +++ en/manual/assets/media/asset-bundle-location.webp | 3 +++ 6 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 en/manual/assets/media/archetypes.svg create mode 100644 en/manual/assets/media/archetypes.webp create mode 100644 en/manual/assets/media/asset-bundle-location.svg create mode 100644 en/manual/assets/media/asset-bundle-location.webp diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md index 06988d86e..b6dc453a4 100644 --- a/en/manual/assets/archetypes.md +++ b/en/manual/assets/archetypes.md @@ -4,12 +4,12 @@ Stride allows you to create variants of the same asset that only change a selected number of properties, while remaining synchronized with the base. -TODO: IMAGE OR VISUALIZATION +![](media/archetypes.webp) Here is some terminology to keep in mind: -* **Archetype** - the original asset from which a different asset derives from. -* **Derived asset** - an asset that derives from a different asset (an archetype). +* **Archetype** - the original asset. +* **Derived asset** - an asset that derives from an archetype. ## Creating a derived asset diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index f8d65de0c..de952251f 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -87,7 +87,7 @@ Bundles are located in `data/db/bundles` next to the built executable. You can r For more information about the build location, visit the [build file structure page](../files-and-folders/building-the-game/build-file-structure.md). -TODO: VISUALIZATION +![](media/asset-bundle-location.webp) > [!NOTE] > Bundles tend to be split into multiple files that start with the same name. diff --git a/en/manual/assets/media/archetypes.svg b/en/manual/assets/media/archetypes.svg new file mode 100644 index 000000000..c461f343e --- /dev/null +++ b/en/manual/assets/media/archetypes.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78aac50cd4d585e69d1ff0aa02b464fd5905735ba1ca9f71df0ba8675f047131 +size 14621 diff --git a/en/manual/assets/media/archetypes.webp b/en/manual/assets/media/archetypes.webp new file mode 100644 index 000000000..d5558de20 --- /dev/null +++ b/en/manual/assets/media/archetypes.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8b9f8964982a006664711b7659f7e537424f941b48968303c23933ce1b3700f +size 97826 diff --git a/en/manual/assets/media/asset-bundle-location.svg b/en/manual/assets/media/asset-bundle-location.svg new file mode 100644 index 000000000..398b1207a --- /dev/null +++ b/en/manual/assets/media/asset-bundle-location.svg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5da04a6f4cc428f748a778c02549dcc72d2b53472cbdcec5c44a2291dcbf8c7 +size 106726 diff --git a/en/manual/assets/media/asset-bundle-location.webp b/en/manual/assets/media/asset-bundle-location.webp new file mode 100644 index 000000000..902cddd4a --- /dev/null +++ b/en/manual/assets/media/asset-bundle-location.webp @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb4cbce3b67bef9adc54242415b9eb6bd382e58e5b97154df17c8450c540ef3f +size 194236 From 1700a65b94bf746e5cb2ff0f5ccb17847978eec5 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sun, 10 May 2026 19:23:53 +0200 Subject: [PATCH 19/22] Moved blue green and gray dots to includes --- en/includes/asset-status-dots.md | 9 +++++++++ .../media/asset-view-indicators.webp | 0 en/manual/assets/asset-compilation.md | 10 +--------- en/manual/assets/index.md | 4 ++++ en/manual/get-started/assets.md | 10 +--------- 5 files changed, 15 insertions(+), 18 deletions(-) create mode 100644 en/includes/asset-status-dots.md rename en/{manual/assets => includes}/media/asset-view-indicators.webp (100%) diff --git a/en/includes/asset-status-dots.md b/en/includes/asset-status-dots.md new file mode 100644 index 000000000..d794b52b9 --- /dev/null +++ b/en/includes/asset-status-dots.md @@ -0,0 +1,9 @@ +In the **Asset view**, you can see a dot in the top left corner of every asset that signifies how it will be compiled. + +![](media/asset-view-indicators.webp) + +Each color represents something: + +* 🔵 **Blue** (will be compiled) - this asset is marked as root, meaning that it will always be compiled in the game no matter if it's referenced or not. +* 🟢 **Green** (will be compiled) - this asset is referenced by another asset that is used in the game, meaning that it will be compiled. +* ⚫ **Gray** (won't be compiled) - this asset isn't referenced by any other asset that's used in the game, meaning that it won't be compiled. diff --git a/en/manual/assets/media/asset-view-indicators.webp b/en/includes/media/asset-view-indicators.webp similarity index 100% rename from en/manual/assets/media/asset-view-indicators.webp rename to en/includes/media/asset-view-indicators.webp diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index abb9d7f38..2d8dc16e7 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -12,15 +12,7 @@ TODO: VISUALIZATION ## Blue, green and gray dots -In the **Asset view**, you can see a dot in the top left corner that signifies how an asset will be compiled. - -![](media/asset-view-indicators.webp) - -Each color represents something: - -* 🔵 **Blue** (will be compiled) - this asset is marked as root, meaning that it will always be compiled in the game no matter if it's referenced or not. -* 🟢 **Green** (will be compiled) - this asset is referenced by another asset that is used in the game, meaning that it will be compiled. -* ⚫ **Gray** (won't be compiled) - this asset isn't referenced by any other asset that's used in the game, meaning that it won't be compiled. +[!INCLUDE [asset-status-dots](../../includes/asset-status-dots.md)] ## Root assets diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index 050adcdad..c3c924bfa 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -10,6 +10,10 @@ In short: * **Resources** - raw data files (`.png`, `.wav`, `.fbx`) * **Assets** - usable elements in the game. They can use resource files and contain additional properties. +## Blue, green and gray dots + +[!INCLUDE [asset-status-dots](../../includes/asset-status-dots.md)] + ## Location of assets and resources In **Game Studio** you can view assets in the **Asset view** by selecting an **assets** folder in the **solution explorer**. diff --git a/en/manual/get-started/assets.md b/en/manual/get-started/assets.md index 1cdb50313..daaf6234d 100644 --- a/en/manual/get-started/assets.md +++ b/en/manual/get-started/assets.md @@ -26,15 +26,7 @@ Finally, you will be asked if you want to **move it to the default location**. A ## Blue, green and gray dots -In the **Asset view**, you can see a dot in the top left corner that signifies how an asset will be compiled. - -![](../assets/media/asset-view-indicators.webp) - -Each color represents something: - -* 🔵 **Blue** (will be compiled) - this asset is marked as root, meaning that it will always be compiled in the game no matter if it's referenced or not. -* 🟢 **Green** (will be compiled) - this asset is referenced by another asset that is used in the game, meaning that it will be compiled. -* ⚫ **Gray** (won't be compiled) - this asset isn't referenced by any other asset that's used in the game, meaning that it won't be compiled. +[!INCLUDE [asset-status-dots](../../includes/asset-status-dots.md)] Stride doesn't include assets which aren't used anywhere, meaning that **they cannot be accessed when running the game**. In order to ensure, that an asset will always be included in the build, right click on it and select **🔵 Include in build as root asset**. From aa6d56fb27d8db1c0673112dc7f029ac484da1b8 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Sun, 10 May 2026 19:28:21 +0200 Subject: [PATCH 20/22] Minor fix to use-an-asset-in-code page --- en/manual/assets/use-an-asset-in-code.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md index 92ec4d640..25a9075c1 100644 --- a/en/manual/assets/use-an-asset-in-code.md +++ b/en/manual/assets/use-an-asset-in-code.md @@ -6,8 +6,8 @@ There are a few ways of using assets in code: * [**Referencing**](#referencing-an-asset) - the easiest way, creates an assignable reference in the **Property grid**. -* [**Url reference**](#url-reference) - creates an assignable reference in the **Property grid**, while allowing you to manually handle loading and unloading of the asset. -* [**Loading from path**](#loading-from-path) - a manual way of loading assets based on their path. You also have to make sure the assets are included in the build and to unload them. +* [**Url reference**](#url-reference) - creates an assignable reference in the **Property grid**, but let's you handle loading and unloading manually. Most commonly used with **scenes**. +* [**Loading from path**](#loading-from-path) - a manual way of loading assets based on their path. ## Referencing an asset From 389182390ddde1b59ba72d60b81592538d7be353 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Mon, 11 May 2026 14:05:29 +0200 Subject: [PATCH 21/22] Polish --- en/includes/content-loading-warning.md | 2 ++ en/manual/assets/archetypes.md | 8 ++++---- en/manual/assets/asset-bundles.md | 4 ++-- en/manual/assets/asset-compilation.md | 8 ++++---- en/manual/assets/edit-an-asset.md | 4 +--- en/manual/assets/index.md | 8 +++++++- en/manual/assets/media/archetypes.svg | 4 ++-- en/manual/assets/media/archetypes.webp | 4 ++-- en/manual/assets/tags.md | 2 +- en/manual/assets/use-an-asset-in-code.md | 14 ++++++-------- en/manual/assets/use-an-asset.md | 4 ++-- 11 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 en/includes/content-loading-warning.md diff --git a/en/includes/content-loading-warning.md b/en/includes/content-loading-warning.md new file mode 100644 index 000000000..80fb8e541 --- /dev/null +++ b/en/includes/content-loading-warning.md @@ -0,0 +1,2 @@ +> [!WARNING] +> When assets are loaded manually, **they have to be manually unloaded too**, or else Stride will keep the assets **loaded in memory forever**. diff --git a/en/manual/assets/archetypes.md b/en/manual/assets/archetypes.md index b6dc453a4..0ca1a42c9 100644 --- a/en/manual/assets/archetypes.md +++ b/en/manual/assets/archetypes.md @@ -21,15 +21,15 @@ In the **Asset view**, right click on the asset you want to derive from and sele ## Overriding values -When changing a property of a derived asset in the **Property grid**, it will be marked as an overridden. Overridden properties are slightly brighter and bolder. +When changing a property of a derived asset in the **Property grid**, it will be marked as overridden. Overridden properties are slightly brighter and bolder. ![](media/property-grid-overriden-property.webp) -Override properties will not be updated when they are changed on the archetype. +Overridden properties will not be updated when they are changed on the archetype. ## Reverting overrides -In case you want to revert a property to use the same values as the archetype, right click on it in the **Property grid** and select **Reset to base value**. +In case you want to revert a property override to use the same values as the archetype, right click on it in the **Property grid** and select **Reset to base value**. ## Unlink from archetype @@ -37,7 +37,7 @@ If you want to turn a derived asset into a normal one (unlinking it from the arc ![](media/property-grid-reset-to-base.webp) -The asset will now no longer follow changes done to the archetype. +Now, the asset will no longer follow changes done to the archetype. ## See also diff --git a/en/manual/assets/asset-bundles.md b/en/manual/assets/asset-bundles.md index de952251f..809ab3dff 100644 --- a/en/manual/assets/asset-bundles.md +++ b/en/manual/assets/asset-bundles.md @@ -53,9 +53,9 @@ Bundles: It's important to note that assets from optional bundles (such as DLC content) **shouldn't be referenced by assets from the default bundle**. If the other bundle is missing, Stride will fail when trying to load it's assets. -However, if a bundle's assets are unreferenced, Stride will not compile them. To prevent this, make sure to **mark the appropriate assets (such as scenes) as root**. This will allow you to access the bundle's assets in code. +However, if a bundle's assets are unreferenced, Stride will not compile them. To prevent this, make sure to **mark the appropriate assets (such as scenes) as root**. The assets will then be accessible in code. -For more information about root assets, visit the [asset compilation page](asset-compilation.md). +For more information about root assets, visit [Asset compilation](asset-compilation.md). ### Compiling behaviour diff --git a/en/manual/assets/asset-compilation.md b/en/manual/assets/asset-compilation.md index 2d8dc16e7..4373e827f 100644 --- a/en/manual/assets/asset-compilation.md +++ b/en/manual/assets/asset-compilation.md @@ -6,7 +6,7 @@ Assets are compiled into **bundles**. ## Which assets are compiled -Stride only compiles assets which are used in the game. This means that if an asset is unreferenced by other assets that are needed by the game, they will be ignored and won't be available to load from code. +Stride only compiles assets which are used in the game. This means that if an asset isn't referenced by another asset that is determined as needed, it will be ignored. TODO: VISUALIZATION @@ -16,11 +16,11 @@ TODO: VISUALIZATION ## Root assets -🔵 **Root assets** are assets that will always be compiled no matter if they are referenced or not. +🔵 **Root assets** are assets that will always be compiled, no matter if they are referenced or not. A few remarks: -* Root assets can be defined in any project package (TODO: CHECK THIS). +* Root assets can be defined in a [project package](../files-and-folders/project-packages/index.md) to which they belong or any other [project package](../files-and-folders/project-packages/index.md) that uses it as a [dependency](../files-and-folders/project-packages/dependencies.md). * You can only mark individual assets as root, not folders. ### How to mark an asset as root @@ -32,7 +32,7 @@ You can mark an asset as root by right clicking on it in the **Asset view** and > [!WARNING] > Marking an asset as root in **Game Studio** will only mark it **for the selected platform**. Make sure to either: > * Mark the asset as root for every platform your project targets -> * Edit the main project package `.sdpkg` manually. For more information, visit the [package properties page](../files-and-folders/project-packages/package-properties.md). +> * Edit the main [project package](../files-and-folders/project-packages/index.md)'s `.sdpkg` file manually. For more information, visit the [package properties page](../files-and-folders/project-packages/package-properties.md). ## Checking assets diff --git a/en/manual/assets/edit-an-asset.md b/en/manual/assets/edit-an-asset.md index 5c850ef73..f444d4f80 100644 --- a/en/manual/assets/edit-an-asset.md +++ b/en/manual/assets/edit-an-asset.md @@ -2,8 +2,6 @@ Beginner -Assets can be edited with **Game Studio**. - Most assets are just a simple list of properties, which can be edited in the **Property grid**. However, more complex assets (such as scenes) require the use of a **dedicated editor**. ## Editing in Property grid @@ -12,7 +10,7 @@ When you select an asset in the **Asset view**, it's properties will show up in ![](media/property-grid-asset-properties.webp) -Your changes will be reflected in the **asset preview** in real time. +Your changes will be reflected in the **Asset preview** in real time. ![](media/asset-preview.webp) diff --git a/en/manual/assets/index.md b/en/manual/assets/index.md index c3c924bfa..abe597198 100644 --- a/en/manual/assets/index.md +++ b/en/manual/assets/index.md @@ -12,8 +12,14 @@ In short: ## Blue, green and gray dots +Stride only compiles assets which are used in the game. This means that if an asset isn't referenced by another asset that is determined as needed, it will be ignored. + +TODO: VISUALIZATION + [!INCLUDE [asset-status-dots](../../includes/asset-status-dots.md)] +For more information about how assets are compiled, visit [Asset compilation](asset-compilation.md) + ## Location of assets and resources In **Game Studio** you can view assets in the **Asset view** by selecting an **assets** folder in the **solution explorer**. @@ -22,7 +28,7 @@ In **Game Studio** you can view assets in the **Asset view** by selecting an **a As for **resources**, it isn't possible to view them in **Game Studio**. You can browse through them by opening the directory containing your project and going to a resource folder of the target [project package](../files-and-folders/project-packages/index.md). -For more information, visit the [project file structure page](../files-and-folders/project-structure.md). +For more information, visit [Project file structure](../files-and-folders/project-structure.md). ## In this section diff --git a/en/manual/assets/media/archetypes.svg b/en/manual/assets/media/archetypes.svg index c461f343e..863fa2e1b 100644 --- a/en/manual/assets/media/archetypes.svg +++ b/en/manual/assets/media/archetypes.svg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78aac50cd4d585e69d1ff0aa02b464fd5905735ba1ca9f71df0ba8675f047131 -size 14621 +oid sha256:7a98f696ee1cb85a40979a48fea10d9f3d6d69dd463f470c72b45dad5f32570c +size 28417 diff --git a/en/manual/assets/media/archetypes.webp b/en/manual/assets/media/archetypes.webp index d5558de20..164ef0d0b 100644 --- a/en/manual/assets/media/archetypes.webp +++ b/en/manual/assets/media/archetypes.webp @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8b9f8964982a006664711b7659f7e537424f941b48968303c23933ce1b3700f -size 97826 +oid sha256:5c864c981d09f527421f2b01f312e8ee9664c24787dde0252fc0708f552d85f3 +size 106804 diff --git a/en/manual/assets/tags.md b/en/manual/assets/tags.md index 45473de43..7e86ecf7e 100644 --- a/en/manual/assets/tags.md +++ b/en/manual/assets/tags.md @@ -2,7 +2,7 @@ Beginner -Assets can be tagged to help with searching and to organize them in [asset bundles](asset-bundles.md). +Assets can be tagged to help with organization and assigning them to [asset bundles](asset-bundles.md). Tags aren't available at runtime. They are only used as a tool in **Game Studio** and during compilation in [asset bundles](asset-bundles.md). diff --git a/en/manual/assets/use-an-asset-in-code.md b/en/manual/assets/use-an-asset-in-code.md index 25a9075c1..ff33dfad4 100644 --- a/en/manual/assets/use-an-asset-in-code.md +++ b/en/manual/assets/use-an-asset-in-code.md @@ -6,7 +6,7 @@ There are a few ways of using assets in code: * [**Referencing**](#referencing-an-asset) - the easiest way, creates an assignable reference in the **Property grid**. -* [**Url reference**](#url-reference) - creates an assignable reference in the **Property grid**, but let's you handle loading and unloading manually. Most commonly used with **scenes**. +* [**Url reference**](#url-reference) - creates an assignable reference in the **Property grid**, but let's you handle loading and unloading manually (most commonly used with **scenes**). * [**Loading from path**](#loading-from-path) - a manual way of loading assets based on their path. ## Referencing an asset @@ -43,7 +43,7 @@ It will show up in the **Property grid** like so: ![Image of the script in the Property grid showing the property with the text "No asset selected", two icons of a hand and an eraser and an empty square with a hand icon.](media/property-grid-url-reference-example.webp) -The asset can be retrieved via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unload it using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). +The asset can be loaded via the **content system** by using [`Content.Load`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.Load*) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.UrlReferenceContentManagerExtenstions.LoadAsync*) and and then unloaded using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). ```csharp public override void Start() @@ -57,14 +57,13 @@ public override void Cancel() } ``` -> [!WARNING] -> When assets are loaded manually, **they have to be manually unloaded too**, or else Stride will keep the assets **loaded in memory forever**. +[!INCLUDE [content-loading-warning](../../includes/content-loading-warning.md)] ## Loading from path -Assets can also be loaded based on their path in the Assets folder directly through code, **without having to assign anything**. +Assets can also be loaded based on their path in the **assets** folder directly through code, **without having to assign anything**. -Assets can be loaded via the **content system** using [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) and then unloaded using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). +This is done via the **content system** using [`Content.Load`](xref:Stride.Core.Serialization.Contents.ContentManager.Load``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) or [`Content.LoadAsync`](xref:Stride.Core.Serialization.Contents.ContentManager.LoadAsync``1(System.String,Stride.Core.Serialization.Contents.ContentManagerLoaderSettings)) and then unloading is done using [`Content.Unload`](xref:Stride.Core.Serialization.Contents.ContentManager.Unload*). ```csharp public override void Start() @@ -78,8 +77,7 @@ public override void Cancel() } ``` -> [!WARNING] -> When assets are loaded manually, **they have to be manually unloaded too**, or else Stride will keep the assets **loaded in memory forever**. +[!INCLUDE [content-loading-warning](../../includes/content-loading-warning.md)] ### Missing assets diff --git a/en/manual/assets/use-an-asset.md b/en/manual/assets/use-an-asset.md index 2523f5263..9c907d65a 100644 --- a/en/manual/assets/use-an-asset.md +++ b/en/manual/assets/use-an-asset.md @@ -28,11 +28,11 @@ You can create an assignable reference to an asset in your script by creating a public Model ModelAsset { get; set; } ``` -This will show up in the **Property grid** like so. +This will show up in the **Property grid** like so: ![](media/property-grid-direct-reference-example.webp) -This way, the asset will be loaded automatically. However, Stride also provides a way of **managing loading manually**. For more information, visit the [use an asset in code page](use-an-asset-in-code.md). +This way, the asset will be loaded automatically. Stride also provides a way of **managing loading manually**. For more information, visit [Use an asset in code](use-an-asset-in-code.md). ## See also From dadab90ae06754fac18311c9a9f36dd9944226e0 Mon Sep 17 00:00:00 2001 From: Ferafiks Date: Tue, 19 May 2026 21:00:44 +0200 Subject: [PATCH 22/22] Updated links --- en/manual/animation/index.md | 2 +- en/manual/game-studio/load-scenes.md | 2 +- en/manual/scripts/create-a-model-from-code.md | 4 ++-- en/tutorials/csharpbeginner/loading-content.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/en/manual/animation/index.md b/en/manual/animation/index.md index fbd996daa..0e07c6dcc 100644 --- a/en/manual/animation/index.md +++ b/en/manual/animation/index.md @@ -28,7 +28,7 @@ Skeletons don't have to resemble the skeletons of real humans or animals. You ca **Skinned models** are models that have been skinned to match a skeleton. The **skin** describes how vertices of the mesh transform when bones move. >[!NOTE] ->In Game Studio, you can only create simple 3D models such as spheres and cubes. For information about how to do this, see the [create an asset page](../assets/create-an-asset.md). To create more complex models, use dedicated software like 3DS Max, Maya, or Blender, then [import the model into Game Studio](import-animations.md). +>In Game Studio, you can only create simple 3D models such as spheres and cubes. For information about how to do this, see [Create an asset](../assets/create-an-asset.md). To create more complex models, use dedicated software like 3DS Max, Maya, or Blender, then [import the model into Game Studio](import-animations.md). ## Animation clips diff --git a/en/manual/game-studio/load-scenes.md b/en/manual/game-studio/load-scenes.md index 6e4d498de..31c58ed70 100644 --- a/en/manual/game-studio/load-scenes.md +++ b/en/manual/game-studio/load-scenes.md @@ -32,7 +32,7 @@ myChildScene1.Add(myChildScene2); >To include a scene in the build, in the **Asset View**, right-click the scene asset and select **Include in build as root asset**. ->For more information about including assets in the build, see [the asset compilation page](../assets/asset-compilation.md). +>For more information about including assets in the build, see [Asset compilation](../assets/asset-compilation.md). For more information about scene hierarchies, see [Manage scenes](manage-scenes.md). diff --git a/en/manual/scripts/create-a-model-from-code.md b/en/manual/scripts/create-a-model-from-code.md index 3346854a7..ad99522fa 100644 --- a/en/manual/scripts/create-a-model-from-code.md +++ b/en/manual/scripts/create-a-model-from-code.md @@ -40,7 +40,7 @@ You can create models in scripts at runtime. You can do this in several differen ![Include in build as root asset](media/create-model-from-code-include-in-build-as-root-asset.png) - This makes sure the asset is available for the script to use at runtime. For more information, see the [asset compilation page](../assets/asset-compilation.md). + This makes sure the asset is available for the script to use at runtime. For more information, see [Asset compilation](../assets/asset-compilation.md). ## Create a procedural model @@ -137,7 +137,7 @@ Finally, you need to give the model one or more materials. There are two ways to ![Include in build as root asset](media/create-model-from-code-include-material-in-build-as-root-asset.png) - This makes sure the asset is available for the script to use at runtime. For more information, see the [use an asset in code page](../assets/use-an-asset-in-code.md). + This makes sure the asset is available for the script to use at runtime. For more information, see the [Use an asset in code](../assets/use-an-asset-in-code.md). ### Option 2: Create new materials in code diff --git a/en/tutorials/csharpbeginner/loading-content.md b/en/tutorials/csharpbeginner/loading-content.md index 1e83e7908..68fba1927 100644 --- a/en/tutorials/csharpbeginner/loading-content.md +++ b/en/tutorials/csharpbeginner/loading-content.md @@ -6,7 +6,7 @@ This C# Beginner tutorial covers how to load content from code. Assets like models, textures, sound etc can be loaded from during runtime. At that point we no longer speak of assets but of 'content'. -This tutorial specifically loads content of the `Model` type. Loaded content that is no longer required in your scene, should be unloaded again so save up memory. For more information on assets see the [use an asset in code page](../../manual/assets/use-an-asset-in-code.md). +This tutorial specifically loads content of the `Model` type. Loaded content that is no longer required in your scene, should be unloaded again so save up memory. For more information on assets see [Use an asset in code](../../manual/assets/use-an-asset-in-code.md). ![Loading content](media/loading-content.webp)