Unity Scripts edited in Visual studio don’t provide autocomplete
Unity Scripts edited in Visual studio don’t provide autocomplete
Unity Scripts edited in Visual studio don’t provide autocomplete
You can’t read the Resources directory with the StreamReader or the File class. You must use Resources.Load. 1.The path is relative to any Resources folder inside the Assets folder of your project. 2.Do not include the file extension names such as .txt, .png, .mp3 in the path parameter. 3.Use forward slashes instead of back slashes … Read more
Found the problem. Below is the FIXED code that plays Video and Audio: //Raw Image to Show Video Images [Assign from the Editor] public RawImage image; //Video To Play [Assign from the Editor] public VideoClip videoToPlay; private VideoPlayer videoPlayer; private VideoSource videoSource; //Audio private AudioSource audioSource; // Use this for initialization void Start() { Application.runInBackground … Read more
There are many ways to wait in Unity. They are really simple but I think it’s worth covering most ways to do it: 1.With a coroutine and WaitForSeconds. This is by far the simplest way. Put all the code that you need to wait for some time in a coroutine function then you can wait … Read more
There are many ways to do this but the solution to this depends on the type of data you want to pass between scenes. Components/Scripts and GameObjects are destroyed when new scene is loaded and even when marked as static. In this answer you can find Use the static keyword Use DontDestroyOnLoad Store the data … Read more
But I heard this way has some issues and not suitable for save. That’s right. On some devices, there are issues with BinaryFormatter. It gets worse when you update or change the class. Your old settings might be lost since the classes non longer match. Sometimes, you get an exception when reading the saved data … Read more
You don’t use the Input API for the new UI. You subscribe to UI events or implement interface depending on the event. These are the proper ways to detect events on the new UI components: 1.Image, RawImage and Text Components: Implement the needed interface and override its function. The example below implements the most used … Read more
Unity added JsonUtility to their API after 5.3.3 Update. Forget about all the 3rd party libraries unless you are doing something more complicated. JsonUtility is faster than other Json libraries. Update to Unity 5.3.3 version or above then try the solution below. JsonUtility is a lightweight API. Only simple types are supported. It does not … Read more
Thanks Github issues, I had finally solve the solution. The problem is happen with Google app sign in. From https://github.com/playgameservices/play-games-plugin-for-unity/issues/1754#issuecomment-304581707 What I did: Google Play Console -> Select your app -> Release Management -> App signing -> App signing certificate : copy SHA-1 (dont copy word ‘SHA1:’) open console.developers.google.com , select your project -> credentials … Read more