Comments (7)
Have just heard whispers of this before, didn't know that it was possible to use a package.json. Being a web dev I love this 😺
Hope you don't mind, but will try to implement this myself. Think it is important to know what is going on. If successful I will commit the changes to v1.0.0. I'm using the library in my current game, so I also want to make sure that I will be able to migrate to this new structure.
Do you know the workflow for when developing a package like this? It's not possible to open the repository directly in Unity, so I guess you would need a test Unity project where you in your manifest point to your local version of the library. Or any other ideas? Just realized that it might me a good idea to have a Unity project inside the repo, but not at the top level and that is not included in the package itself 🤔
from unity-atoms.
What I've done: (btw if you start with an empty project this is much easier, because you can just git init
inside the Assets folder)
I moved the whole project folder inside a new folder "unity-atoms-wrapper" and inside the subfolder "Assets". so for unity the new project will be the wrapper, while the git repository is inside the Assets folder.
Then i moved everything that isn't a source file (e.g. the ProjectSettings folder, ...) into the wrapper directory.
I also removed the UnityAtoms folder inside Assets, because it is an unnecessary nesting.
I moved the Editor folder and Tests, Examples folder to the Assets folder and Everything else into an Source folder.
and i used the package.json to only include Editor, Source and License files. since i would not want to be examples or tests in a package.
Also i added assembly definitions for all the specific folders.
On a new Project:
- Unity Project Folder
- Unity Folders like Library, Packages, ProjectSettings, ...
- Assets
- (git init here, also .gitignore and .gitattributes if needed)
- Editor
- *.asmdef for editor stuff
- Tests
- *.asmdef for test stuff
- Source
- *.asmdef for the entire package
- LICENSE
- README (since this is the git projects root)
- package.json
from unity-atoms.
Implemented in this commit: a3ea1a1
Think it is better to have an example Unity project as a subfolder of the repo in order to work on the library. Of course this project will be excluded from the package. Will create a new issue for adding the project.
from unity-atoms.
Think it is better to have an example Unity project as a subfolder of the repo in order to work on the library.
yeah, in my fork i did not delete the examples, i just excluded them from the package, they are still in git
from unity-atoms.
Did you manage to exclude folders in the package.json file? Seems like Unity's package manager is ignoring what I add to the "files" array in the package.json
from unity-atoms.
with my fork, in Unity 2018.3.7f1:
some of the package.json features are ignored by unity, even more so in older versions
if i add this to the package manager:
"com.mambojambostudios.unityatoms": "https://github.com/AdamRamberg/unity-atoms.git#a3ea1a1",
it works fine, too (same structure as in the image above, but its definitely your repo because i refactored my fork to a very different folder structure).
note that the last part after the #
is an identifier, if you name your branches and your tags the same i don't know how that is resolved. (because you have a branch "v1.0.0" and at somepoint there might also be a tag "v.1.0.0").
from unity-atoms.
Hmm alright. Might be that I add Unity Atoms as a local file instead of via the github repo URL. Will have to fiddle around a little bit more.
from unity-atoms.
Related Issues (20)
- [BUG] npm run generate:docs throws error HOT 3
- [FEATURE] MonoHooks should be able to call instancer-events HOT 2
- [Documentation] Asset based Generators + asmdefs
- [BUG] Replay buffer size is not visible in inspector HOT 2
- StringReference property drawer not working HOT 4
- [BUG] FSM not compatible with disabled domain reload HOT 11
- [BUG] Vector2Refrence inspector doesn't work HOT 1
- [BUG] Trying to create atoms for an interface creates flow of editor errors HOT 5
- [BUG] Atom search is rendering with strange padding and red text HOT 1
- [BUG] Generator asset fails to generate some `UnityEngine` types. HOT 2
- [Documentation] Add section about Pre Change Transformers HOT 5
- [FEATURE] Tag Package, Events HOT 1
- [FEATURE] Upgrading Documentation to Docusaurus 2.x and adding a search plugin
- [BUG] NullReferenceException in HandlePlayModeStateChange HOT 1
- [BUG] AtomValueList keeps runtime modifications HOT 1
- [BUG] AtomValueList not compatible with disabled domain reload HOT 1
- [FEATURE] Improve Inspector legibility
- [BUG] FiniteStateMachine not firing events anymore HOT 2
- A number of issues with AtomLists/AtomCollections HOT 2
- [FEATURE] More public get-properties for fields HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity-atoms.