Coder Social home page Coder Social logo

Comments (4)

alffanclub avatar alffanclub commented on July 17, 2024

@optimisez do you ever use variants? I could maybe work out a way for you to mark items with periods as "not a variant" but I'm not sure how stable that would be. Is there a particular reason you don't just do an alternate character, such as "cube_prefab"?
One unrelated note, I noticed your bundle name has $ where the file has folders, just fyi you can mimic folder structure in bundles. You could name the bundle "assets/resources/cube_prefab". In the browser, it would show as a file hierarchy, and on-disk the generated cube_prefab bundle would be in a folder called resources in a folder called assets. Not sure if that would be beneficial, just making sure you were aware.
Thanks for bringing up the issue. I'll start pondering and poking at some way to allow periods in bundle names.

from assetbundles-browser.

optimisez avatar optimisez commented on July 17, 2024

I would like to variants but until now I still not really sure how to use it. The reason I not able to use alternate character, such as "cube_prefab" is because I already designed the APIs to load asset bundle and its asset that way and I think using period can clearly tell that it is file extension.
For bundle naming, unfortunately file name does not allow / symbol. I use $ symbol to replace / symbol. So, name the bundle "assets/resources/cube_prefab" is not possible. So, I think u may need to implement something to make able to read $ symbol to support show as a file hierarchy function.
11

from assetbundles-browser.

alffanclub avatar alffanclub commented on July 17, 2024

to be clear, I was not suggesting you build a bundle, then rename it to include a / in the file name. If you create a bundle named "assets/whatever" in editor, then the build code will create a folder called "assets" and then create a bundle called "whatever" and put it in there. You can then load that bundle as "assets/whatever". In the bundle browser, it will visually display this as a sub folder in the bundle list. The asset list of the browser will mark that asset as being in a bundle called "assets/whatever" as will the old in-inspector bundle drop down.
As to the original topic, using a period in a bundle name, I just can't support it. I understand you wanting to know about file extensions, but that just doesn't really translate into bundles. Partly due to the fact that the variant system has chosen to hijack extensions and use them as variants. Partly due to the fact that the bundle is not the asset you started with. It is a bundle of it. It wouldn't make sense to have a file called "myCool.doc" that is your word doc, then another file somewhere else called "myCool.doc" that is a zip file containing your doc. The zip should be called myCoolDoc.zip" or something along those lines.
One other note, if you are really putting your assets in your project in a folder called "resources", then they will show up in the player build automatically. (see https://unity3d.com/learn/tutorials/temas/best-practices/resources-folder). This means that if you have some asset that traces it's file path up to any folder called "resources" any distance up the path, AND you mark it as being in a bundle, you'll end up with that asset both in a bundle, and in the player build.

from assetbundles-browser.

alffanclub avatar alffanclub commented on July 17, 2024

@optimisez I should add one more note. It's exactly these sorts of uncommon usage patterns that led us to making this tool open source. We know there's no possible way for us to make a tool that suits everyone's workflow perfectly. If you have a workflow that you need to follow to be productive, then I don't want to interfere with that. Please take the tool and customize it to your hearts content. If you find a way to cleanly and safely support periods in bundle names and variants feel free to create a PR to bring it back to the masses. More likely I'd imagine you could fairly easily customize the tool to your need. The changes needed probably couldn't be translated back into a general-purpose solution, but that is fine. That's even encouraged. We expect more than one situation to arise that requires the user to take our tool, customize it in a very specialized way, and use it for just their own project.
Hope that helps, and thanks for trying out this tool.

from assetbundles-browser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.