Copy code from here- u3ds.blogspot.com/2021/01/get... Feel free to Like and Share to show support for this channel. Don't forget to leave a comment if anything comes to mind. Have a nice day :) #unity #rest #api
Пікірлер: 49
@aussieraver718210 ай бұрын
I didnt realise you could do this sort of stuff. When I found out years ago, it blew my mind with the amount of integration you can perform.
@minmyatzawmoe50232 жыл бұрын
Action speaks louder than words. Cool~
@dmytromahas92072 жыл бұрын
Thanks for this useful tutorial, you've helped me so much!
@MrZtapp2 жыл бұрын
Very good, thanks.
@erickr1992 жыл бұрын
Anyone knows of a tutorial of how to do it the other way around? i have and application which has to post information into unity using rest
@Pranav9894 Жыл бұрын
Thank you soo much man
@NewbNinjas Жыл бұрын
How do you actually POST it though? I'm trying to upload a file to my web hosting, I can retrieve it and display it using the GET method but the POST method doesn't work, just says forbidden if I define the directory only where my handle_post.php file is, or if I specify the actual php file, it says error 404. I'm confused. Any help would be deeply appreciated.
@shurvirmori3 жыл бұрын
No matters, How much subscribers.... This Video Matters which is very Easy to understand and start me with Rest API. Thanks bro :) ☺
@shurvirmori3 жыл бұрын
But How to access data which I got in JSON?, kindly make video on this too.
@Unity3DSchool3 жыл бұрын
I will surely create a video on this topic. Meanwhile you can check this video for JSON Deserialization - kzbin.info/www/bejne/nWHOZYuJqd-egrM
@blockchaingames19872 жыл бұрын
It works for me. Its shows me the JSON Data but i just want to show a specific part of the API and not all information. Can you share how to do JsonUtility.FromJson(json) after Web request. Thank you.
@marcelopc72833 жыл бұрын
muchas gracias!
@jfiascaro2 жыл бұрын
How can we send the secret and public keys for security connection?
@XilofononeXinining Жыл бұрын
How to resolve that? I receive this at 2:10 instead-> NullReferenceException: Object reference not set to an instance of an object GetMethod+d__3.MoveNext () (at Assets/GetMethod.cs:21) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at :0) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) GetMethod:GetData() (at Assets/GetMethod.cs:17) UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:501)
@NitishBeejawat7 ай бұрын
Facing same issue. Have you solved it?
@fatihay23282 жыл бұрын
thanks man
@denyandriana91693 жыл бұрын
Thank you
@yourlocalgamedev18343 жыл бұрын
Hey how could I use web request to get texture?
@NHGeneral3 жыл бұрын
Hi Unity3D School, I am new to Unity and have not much knowledge about webserver, my case is: I have a LAMP set up in my Raspberry Pi 4, and it working fine. I can open phpmyadmin page on Raspi on my PC's browser. I need to make an very simple mobile app to trade data with Raspi for Home management usage. Does the method mentioned in this work with my config? If not, please tell me what I need to do, or just change the concept. Please help.
@thereborne52192 жыл бұрын
yes, since this is a http request.
@restushlogic5794 Жыл бұрын
do you know what kind of service that I can manage my own json for free or cheap?
@BahadrCAKARhosgeldin2 жыл бұрын
So can we play a unity project with the same way mate?
@chamilagayan2593 Жыл бұрын
I got this error while get data - HTTP/1.1 405 Method Not Allowed
@hank89133 жыл бұрын
Sry for asking a question , I was following ur steps (PostData) and then Unity returns my start not set to an instance of an object (All codes are correct ) What is goning on here ? :(
@Unity3DSchool3 жыл бұрын
I have to see your code to find the exact reason but if the error is in Start then my guess is that the gameobject with the given name is not found in the scene. Check if the name is exactly the same.
@bomxacalaka20332 жыл бұрын
How can I GET request all the text from the box, basically the reverse of what you did in the video.
@gorik3337 ай бұрын
JsonConvert.SerializeObject
@nabilhamouda14723 жыл бұрын
hello :) this method really good and works good for me but in my case I am using unity3d and azure ,,, so I want the text to appear in TextMeshPro component which I add to SlateUGUI ,,, so i just i dont know how to modify the script with that cause i tryed but doesnt work ..i hope you can help me
@Unity3DSchool3 жыл бұрын
Replace InputField with TextMeshPro. If it is still not working then I suggest you to search online "setting text of TextMeshPro in Unity" or something like this. You will surely find the solution.
@nabilhamouda14723 жыл бұрын
@@Unity3DSchool It works well for me now thank you, just one question please... I have different texts which I put it in Json file and put it on server ,,, and i want to get them like here in this video, how can I modify the Script ? if I want to add 2 buttons next and previous to pass from text to other how can i add them to script ? really hope you can help me with that cause it s important for me and thank you so much :)
@deflatedbraincell Жыл бұрын
Hi, what if the json data is nested, for example: { "user": { "userID": "1234", "username": "testuser", } }
@rapideye101 Жыл бұрын
write a class which has that format and deserialize from JSON into this class, the class has to be [System.Serializable]
@Sir-Prakarn2 жыл бұрын
Thank you so much
@ItsYourBoPhase2 жыл бұрын
Can you use a POST to upload an image file?
@Unity3DSchool2 жыл бұрын
Yes. You can covert image into either binary or base64 string. After that you can send the binary/string with POST body. Never tried it but it should work. Will make a video on it. 😁
@beneilton1000 Жыл бұрын
@@Unity3DSchool And a zip file is the same?
@codebreaker25902 жыл бұрын
How to get my own weblink
@codebreaker25902 жыл бұрын
Its only work if we use your web
@luyangzou64793 жыл бұрын
how to check the post data is working ?
@Unity3DSchool3 жыл бұрын
isHttpError or isNetworkError will return true in case there is problem in posting data.
@luyangzou64793 жыл бұрын
@@Unity3DSchool Thanks, I tried that post button, it sends 4 as the data, but where I can change it and where it will be showing? since the URL inside the code is the 'get' function URL?
@jimbaub3 жыл бұрын
@@luyangzou6479 You can send a POST request to the same URL and the server will process it differently. If you run a GET request and see there are 4 items, then you run a POST to the same URL and it's set up to handle them, you should be able to run the GET request a second time and see 5 items.
@karimhajsalah62513 жыл бұрын
hi , how to post data in webserver
@Unity3DSchool3 жыл бұрын
Posting data is also demonstrated in video.
@gaffarwanitek75082 жыл бұрын
You might be good with networking but a very bad Unity programmer XD
@leeoiou72952 жыл бұрын
Your code is so bad! why are you searching for gameobjects by their name when you can serialize it and still make it private? SMH
@Unity3DSchool2 жыл бұрын
This video is not about getting game object. I am just using one of the methods available to get the game object. Also think about it, if searching is so bad then why its still available to use. If I can not use searching here then where can I use it? think about it. Just don't use Find in every frame and you are good to go. docs.unity3d.com/ScriptReference/GameObject.Find.html
@leeoiou72952 жыл бұрын
@@Unity3DSchool The reason searching is so bad is that if you are searching by name and you change the name of the gameobject then you could easily get a null reference. The reason I pointed this out is that beginners pick up a lot of programming habits from tutorials. So even if the video is not about getting gameobjects, someone could learn the wrong or inefficient method. Not only are you using Gameobject.Find(), you are also getting component when you could simply just assign it and still make it private.
@Unity3DSchool2 жыл бұрын
The point is that you will get NRE if you change the name. No matter what method you use, there will always be 'what if..'. What If someone deletes the game object OR what if I delete the component OR What if I delete the tag etc. There is no bad code, only bad use. In this particular case, I found this the quickest way to do things, and at the same time, I demonstrated the use of Find. As for beginners, I will encourage them to learn about the Find, how to use it and why it should be used carefully. But thanks for mentioning this. I will try to be more careful in the future.