Contentless icon indicating copy to clipboard operation
Contentless copied to clipboard

Deleting content that is not in content folder?

Open Shadowblitz16 opened this issue 2 years ago • 9 comments

If someone renames a file this breaks. Try to check if the file still exists that is referenced in the mgcb, if it doesn't remove it before trying to add it back again

Shadowblitz16 avatar Nov 27 '23 01:11 Shadowblitz16

Hi! Contentless doesn't remove content items from the content builder file if they were moved or don't exist anymore, and it's not meant to do so either. Contentless only adds new content files to the content builder based on its default rules or the rules laid out in your Contentless.json config file. If you remove a file, you have to remove it manually from the content builder file as you would if you weren't using Contentless. I hope that answers your question, but let me know if it hasn't!

Ellpeck avatar Nov 27 '23 10:11 Ellpeck

@Ellpeck Why is the content not synced with the stuff in the folder though? It's suppose to be contentless not require us to open the mgcb every time a reference breaks. If someone renames or deletes a asset it should update it accordingly in the content. At least make it an option.

Shadowblitz16 avatar Nov 28 '23 03:11 Shadowblitz16

As advertised, Contentless is a tool for adding assets to the content pipeline, not updating or changing existing ones. A key part of the philosophy of Contentless is the following, as described in the README:

As Contentless never changes any existing content of a Content.mgcb file, all changes that are made to it by hand or using the Content Pipeline tool will not be overridden.

Sorry if this is not a policy you agree with!

Ellpeck avatar Nov 28 '23 10:11 Ellpeck

Hi! I've gone back and forth on this and decided that, especially with #3 as a new suggestion, it might be nice to have this as a feature that is disabled by default, but can be enabled in the Contentless.json file per project!

Ellpeck avatar Dec 06 '23 16:12 Ellpeck