Skip to content

WIP: feat: Export Assets with Resources and SDSL Shaders to ZIP Archive - #5

Open
w0wca7a wants to merge 88 commits into
masterfrom
feat/asset_exporter
Open

WIP: feat: Export Assets with Resources and SDSL Shaders to ZIP Archive#5
w0wca7a wants to merge 88 commits into
masterfrom
feat/asset_exporter

Conversation

@w0wca7a

@w0wca7a w0wca7a commented Jun 12, 2026

Copy link
Copy Markdown
Owner

PR Details

This PR adds an Export Asset feature to the Game Studio Asset View context menu.
It allows exporting selected assets along with all their dependencies, source files,
scripts, and shaders into a single portable ZIP archive.

Related Issue

No existing issue — this is a new feature proposal.
Based on Eideren's comment from discussions about resources stride3d#2583.
Also inspired by idea about marketplace

Changes

Modified files

  • sources/editor/Stride.Core.Assets.Editor/ViewModel/AssetCollectionViewModel.cs
    — one line added in constructor to initialize the export command
  • sources/editor/Stride.GameStudio/View/GameStudioWindow.xaml
    — one MenuItem added to the Asset View context menu in the Explore section

New files

  • sources/editor/Stride.Core.Assets.Editor/ViewModel/AssetCollectionViewModel.ExportAssets.cs
    — partial class containing all export logic

Roadmap

  • Context menu integration — "Export asset..." item added to the Asset View
    right-click menu in the Explore section
  • Recursive dependency resolution via AssetDependencyManager
    all referenced assets are collected recursively including broken link warnings
  • Asset files (.sdtex, .sdm3d, .sdscene, etc.) exported with their
    original folder structure relative to the package root
  • Source files (FBX, PNG, WAV, etc.) exported via IAssetWithSource.MainSource,
    covering ModelAsset, AnimationAsset, SkeletonAsset, TextureAsset and others
  • External source files (located outside the project folder) included in
    Resources/External/ with a hash suffix to avoid name collisions,
    with a warning listed in the completion dialog
  • SDSL/SDFX shaders detected via ComputeShaderClassColor.MixinReference
    in material attributes using recursive reflection, exported to Effects/
  • C# scripts detected from SceneAsset and PrefabAsset component types,
    filtered to non-Stride assemblies and ScriptComponent subclasses only,
    exported to Scripts/ with correct paths per package
  • Multi-package support — scripts and shaders are searched across all packages
    in the session; each file's archive path is relative to its own package root
  • Duplicate source file prevention via HashSet deduplication for sources,
    scripts, and shaders
  • Assembly-based script resolutiontype.Assembly.Location is used to
    identify which package a script belongs to, avoiding inclusion of excluded
    or duplicate files from referenced projects
  • Progress indicator — uses StatusViewModel.NotifyBackgroundJobStarted /
    NotifyBackgroundJobProgress / NotifyBackgroundJobFinished to show a
    progress bar in the Game Studio status area during export
  • manifest.json included in the archive root with root asset IDs, locations,
    and a full list of all exported assets with their types
  • Overwrite support — existing ZIP at the target path is deleted before writing
  • Save file dialog with default filename based on the selected asset name
  • Screenshot / thumbnail — no preview image is included in the archive;
    a scene thumbnail or asset preview would improve discoverability when browsing
    exported packages
  • Script reference integrity — after import into another project, script
    component references on entities may be broken if the target project does not
    have matching assembly names or namespaces; no remapping is performed
  • Import workflow — this PR covers export only; a corresponding import feature
    (reading manifest.json and registering assets into a target package) is not
    implemented
  • Partial .cs file detection edge cases — scripts are found by filename glob
    (ClassName*.cs); files with naming conventions that differ significantly from
    the class name may not be found
  • Code placement — export logic currently lives entirely in
    Stride.Core.Assets.Editor; parts of it (dependency traversal, source file
    resolution) could be moved to Stride.Core.Assets for reuse outside the editor
  • No unit tests — export logic is not covered by automated tests

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

xen2 added 30 commits June 10, 2026 17:27
deps/FFmpeg/ restructured to per-RID subdirs (mirrors deps/VHACD/Release/),
packed at runtimes/<rid>/native/. ToolLocator gains an opt-in ensureExecutable
flag (flips +x on Linux/macOS since dotnet pack loses the bit) and a
<pkgRoot>/runtimes/<rid>/native/ probe for the NuGet-cache layout.
SampleScreenshotTests honors STRIDE_TESTS_KEEP=1 to skip the post-pass
cleanup of samplesGenerated/<name>/. GameMenu sets a claudeFallback hint so
the vision arbiter ignores background-text overlap from font-metric drift.
Matrix gains an ubuntu-24.04/Vulkan entry; OS-specific steps (crash-dump
regkeys, apt deps, Xvfb, Lavapipe ICD registration, NuGet user-config
path) are gated by runner.os. Default shell switched to bash so the
build/test commands share a single code path across runners.

Artifact names include the OS label to avoid cross-platform collisions.
Partial-matching just "Liberation" hits Liberation Mono first on some
filesystems, producing monospace metrics for samples that expect a
proportional font and overflowing UI text layout.
xen2 and others added 29 commits June 12, 2026 01:21
…preinstalled set re-download, ~4min -> ~2min)
Trim repo & CI checkout sizes (LFS, sparse checkout, LLVM via NuGet)
…erences

refactor: Remove unused package references from project files
Fix sample teardown hang: drain GPU before the window is destroyed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants