Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by M4ximal · Nov 28, 2015 at 11:23 PM · apirest

How to include RestSharp For Unity3D

Hello Everyone :),

I'm trying to build a VRNews Application using Unity 5. The final App Should run under Android and I want to acces NY Times API with a RESTRequest to get my news. I found RestSharp in the normal NuGet Packet Manager but if i try to install it I get the following error message:

"Error Could not install package 'RestSharp 105.2.3'. You are trying to install this package into a project that targets '.NETFramework,Version=v3.5,Profile=Unity Subset v3.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."

But there is a Version for Unity3D ( https://github.com/Cratesmith/RestSharp-for-unity3d ), but I have no idea how I should include it into my project. The folder contains several .sln Files, the overall structure is as follows:

alt text

I'd like to include a version that works for debugging on my pc and the android version, could you help me on how to include this RestSharp Version into Unity? I also noticed that it is quiet dated, I hope it's even possible to include it into Unity 5.

Thank you very much, Max

unityrestsharp.jpg (60.5 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by theLittleSettler · Nov 29, 2015 at 02:04 AM

The gist of it is you need a dll (or whatever) supporting .net 3.5 . Looking at that...I can't see anything compiled and ready to go, but it should be pretty straight forward to download and compile it through visual studio (or is that a monodev project?...one of them)

Then include that compliled library in your assets folder and add a reference to it in your ide.

Edit: missed the bit about debugging... I'm not sure about that, but I'd give the android one a shot. They must have some way of running on pc for developing it. It might be easier to test that outside of the unity project. Should there be something that works for windows, but not for andoid, you could use unity's compile directives to make that happen...ie

 #if UNITY_EDITOR
     // some solution that works on windows
 #else
     // android code
 #endif

Sorry I can't be more specific :/

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image M4ximal · Nov 29, 2015 at 12:12 PM 0
Share

Thank you for your answer it was very helpful.

I compiled the mono Solution in $$anonymous$$onoDevelop and just put the .dll-files inside my asset folder and that's it. I normally use c++ and i was expecting some trouble with .lib's and include directories and so on but c# seems to be a lot smarter in those points. I'll have to check if RestSharp is working on Android though.

Cheers, $$anonymous$$ax

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to add post from wordpress in unity? 0 Answers

Reading JSON response from Google Sheets in unity ( most places have WWW.text) 1 Answer

UnityWebRequest.Post with MultipartFormDataSection returns Bad Request (400) 0 Answers

Javascript in Unity, Including iPhone API's (Objective C?) 2 Answers

Where to market my games without API requirements ? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges