Giter VIP home page Giter VIP logo

Comments (9)

edwardrowe avatar edwardrowe commented on June 26, 2024 1

Ideally the solution would also allow users on one project to share their settings better. Using PlayerPrefs (PR #8) is an improvement over EditorPrefs, since it won't share the settings across projects, but it doesn't allow multiple users to share settings.

I think the only fix is to put the settings in a file that is stored in source control. I've seen several good assets such as DoTween just use a ScriptableObject in the Resources folder, which is the fix I'm working on atm for my team.

from animationimporter.

edwardrowe avatar edwardrowe commented on June 26, 2024 1

Good question - My main reason for using "Assets/Resources/AnimationImporter/" is to keep the tool from breaking if users want to move AnimationImporter to a different folder (e.g. "Assets/CustomAssets/AnimationImporter"). If you specify the whole path to the settings ("Assets/AnimationImporter/AnimationImporterData.asset"), and they move the tool, it won't know where to find the new settings.

Resources is nice because it's probably a folder that exists already for users, and it seems like a fairly common convention for custom tools. You also specify the path to the Resources file relative to the Resources directory, which means in theory we could store the settings at "Assets/AnimationImporter/Resources/AnimationImporterData.asset", but we'd have to be sure to generate / load it from the correct directory in the first place. I think once it's generated, it might even work to move it (provided you move it somewhere inside a Resources folder).

I would love to hear other ideas for location though, if you have any.

from animationimporter.

edwardrowe avatar edwardrowe commented on June 26, 2024 1

Almost finished this up. I now just need to make sure I use PlayerPrefs instead of EditorPrefs, where it makes sense.

from animationimporter.

talecrafter avatar talecrafter commented on June 26, 2024 1

Merged with commit f66743b

from animationimporter.

edwardrowe avatar edwardrowe commented on June 26, 2024

I am currently working on this fix for my team as well. I'm using a scriptable object, and right now I'm just using it to store the non-looping clips. Will submit a PR when I'm done, probably this week.

from animationimporter.

AlbertoFdzM avatar AlbertoFdzM commented on June 26, 2024

@edwardrowe you're right I think too that it would be better to have this settings stored in the project source and being able to be tracked by the control version system.

Meanwhile that solution get applied this is a good workaround.

from animationimporter.

talecrafter avatar talecrafter commented on June 26, 2024

A custom asset (Scriptable Object) seems to be a good solution so the settings get tracked by the version control system.
Do you see any reason why it should be in the Resources Folder and not somewhere else?

from animationimporter.

talecrafter avatar talecrafter commented on June 26, 2024

Nah, that's a good explanation. Maybe Unity should have designated a typical folder for this, but as it is Resources seems to be the convention and those few bytes included in a build are negligible anyway.
If you have a solution already feel free to post it, otherwise I'll take a look at it in the near future.

from animationimporter.

edwardrowe avatar edwardrowe commented on June 26, 2024

Ok. I'll do some more research on it cause I'm actually writing a blog post
on this topic as well. Hopefully I'll be submitting a PR tonight.

I totally agree about wanting a common folder or even API for this type of
thing.

from animationimporter.

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.