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

Apply asset library suggestions to ignore folders. #98

Open
fire opened this issue Mar 5, 2024 · 6 comments
Open

Apply asset library suggestions to ignore folders. #98

fire opened this issue Mar 5, 2024 · 6 comments

Comments

@fire
Copy link
Member

fire commented Mar 5, 2024

Consider adding a .gitattributes file to your repo. This file allows giving extra instructions to Git, such as specifying line endings and listing files not required for your asset to function with the export-ignore directive. This directive removes such files from the resulting ZIP file, preventing them from being downloaded by the asset library users. These are common examples of .gitattributes:

# Normalize line endings for all files that Git considers text files.
* text=auto eol=lf

# Only include the addons folder when downloading from the Asset Library.
/**        export-ignore
/addons    !export-ignore
/addons/** !export-ignore

https://docs.godotengine.org/en/latest/community/asset_library/submitting_to_assetlib.html

@fire fire changed the title Apply asset library suggestions. Apply asset library suggestions to ignore folders. Mar 5, 2024
@lyuma
Copy link
Member

lyuma commented Mar 5, 2024

I am not sure this is the best approach.

We need to include vrm_samples since it is recommended for asset library to include examples and this way it can be used as a sample project .

from the documentation:

If your asset is a library for working with other files, consider including example files in the asset.

Is there any Godot documentation that explains how export-ignore is intended to be used with the Godot Asset Library?

@lyuma
Copy link
Member

lyuma commented Mar 5, 2024

Oh I see it recommended there when Addons / Asset Packs is clicked.

I just don't like needing to exclude samples as a workaround for a UX issue in godot's asset library.

If you add vrm_samples/** and vrm_samples to the .gitattributes then I might be ok with doing this

@fire
Copy link
Member Author

fire commented Mar 5, 2024

I am not convinced this is correct, but wanted to make a note here since it was discussed.

@Ughuuu
Copy link

Ughuuu commented Mar 6, 2024

If you are exporting an addon, it doesn't make sense to have the user download other files, except the addons directory. Thats what they expect.

The samples one i feel like it would go or should go in a different addon, eg. Godot-vrm-samples. This should be self contained and should contain maybe godot-vrm as well(or should be inside godot-vrm in a samples folder if you feel like)

Why? If you download an addon, you want it in the addons folder, not polluting your files in your project. Imagine similar to node_modules. I would hate if i download something and i dont know where it goes to. Sure, you can normally select and deselect what you want from an addon, but 99% of people click next and install all.

@Ughuuu
Copy link

Ughuuu commented Mar 6, 2024

I am not sure this is the best approach.

We need to include vrm_samples since it is recommended for asset library to include examples and this way it can be used as a sample project .

from the documentation:

If your asset is a library for working with other files, consider including example files in the asset.

Is there any Godot documentation that explains how export-ignore is intended to be used with the Godot Asset Library?

Is this true though? Do addons have samples? Then it should be inside the addon, not as a separate folder.
If not it should be a separate addon, a samples addon.

@lyuma
Copy link
Member

lyuma commented Mar 6, 2024

I think I am struggling to understand why example files are a problem. If you do not want them during import, uncheck them. If you didn't do that an don't want them, delete the directory at any time.

the official recommendation is to include sample files in the asset. That is what I am doing.

If examples are a separate asset, it adds clutter to the godot asset library, and discoverability is unclear.

the example files do not belong in the addons folder because they are not part of the addon. Having extra files there will bloat any game which uses the addon, which is not my intent.

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

No branches or pull requests

3 participants