Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: User-defined assets support (ScriptableObject like data types and more) #2527

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Eideren
Copy link
Collaborator

@Eideren Eideren commented Nov 21, 2024

PR Details

WIP right now - it works but barely. I feel like most of the logic shouldn't be where I ended up shoving it, would need someone aware of how quantum, the assembly reloader and the undo system work to check over this one.

To create an asset, see @manio143 's https://github.com/manio143/StrideCustomAsset

Related Issue

#30

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.

@Eideren Eideren marked this pull request as draft November 21, 2024 17:08
Copy link
Member

@manio143 manio143 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job on making this one work!

package.Assets.Add(newAssetItem);
AssetItem = newAssetItem;
PropertyGraph?.Dispose();
Session.GraphContainer.UnregisterGraph(assetItem.Id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's an implicit assumption here that previous asset item Id is equal to the new one. Would be good to verify it explicitly (at least with Debug.Assert).

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.

2 participants