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

Topic: Use XInputDotNet with the new unitypackage manager #41

Open
EloiStree opened this issue Nov 26, 2020 · 2 comments
Open

Topic: Use XInputDotNet with the new unitypackage manager #41

EloiStree opened this issue Nov 26, 2020 · 2 comments

Comments

@EloiStree
Copy link

EloiStree commented Nov 26, 2020

Hello.

I just wanted to share with you that if you want to use your tool XInputDotNet with the "new" package manager of Unity.
You can structure it like the fork I did based on your project:
https://github.com/EloiStree/XInputDotNet

If you don't know what is the package manager, I did a tutorial about it:
https://github.com/EloiStree/HelloUnityPackage/wiki

Hope, it helps you.


PS: Thank for your code.
If you have a donation link or a Paypal, I would like to send you a beer for your code ;)

@speps
Copy link
Owner

speps commented Nov 27, 2020

Hi thanks for the heads up but I'm curious why the .unitypackage didn't work for you?

You can download it there: https://github.com/speps/XInputDotNet/releases/latest

@EloiStree
Copy link
Author

EloiStree commented Nov 27, 2020

Not easy to explain in two lines but...
The reason is that with the new package manager, you can make automatic dependency and specification.
Also it means that you can copy past the tool by sharing the link to someone, like this:
image
image

(And it means that when you update the code in you project it can affect all your other projects.)


It is also useful for small experimentation. Because you just add the tool links you want in the Package/manifest.json
And Unity download them all.


If you use the server of Unity you can also have benefic effect of NPM:
https://fr.wikipedia.org/wiki/Npm
You install a tool and it installs the tools it need that installs the tools it need.


Example, just copy past this in your Package/manifest.json

{
  "dependencies": {
    "be.eloistree.license": "https://github.com/EloiStree/GeneralLicense.git",
    "be.eloistree.quickgitutility": "https://github.com/eloistree/2019_07_21_QuickGitUtility.git",
    "be.eloistree.unitypackagefacilitator": "https://github.com/eloistree/2019_07_21_UnityPackageFacilitator.git",
...Unity Code...
    }
}

And now you have my git and unity package tool install in your project ;) .


For example here is how I use your tool:
I have:

  • a package that manage Boolean in a state machine specify to that.
  • your package that manage the entry of the Xbox controller
  • the following tool that merge the two together
  • my applications that use this group of toolboxes just by a copy past in the manifest.

https://gitlab.com/eloistree/2020_11_26_XInputToBoolean/-/blob/master/package.json

{                                                                                
  "name": "be.eloistree.xinputtobooleans",                              
  "displayName": "XInput Dot Net To Booleans",                                               
  "description": "Convert the XInput of Speps XInputDotNet to a booleans usable in a booleans state machine.",                                       
  "dependencies":{
    "be.eloistreebasedonspeps.xinputdotnet":"0.0.1",
    "be.eloistree.booleanstatemachines":"0.0.1"
  }       
...
} 

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

2 participants