unity5

Unity Sharing Facebook,Twitter,whatsapp E.t.c Android

▼魔方 西西 提交于 2019-12-23 05:23:02
问题 Hello i want to share my game on twitter and Facebook , this script allows me to share details to twitter , whatsapp but i cant share on facebook it doesnt show text on facebook , but on twitter and whatsapp it does , And i dont know how to add in To script so it takes screenshot of game and Adds it to post Please help me out Sorry for bad English And Here is ShareScript. Thanks for help :) using UnityEngine; using System.Collections; using UnityEngine.UI; using System.IO; public class

Make texture2D readable in runtime/script Unity3D [duplicate]

妖精的绣舞 提交于 2019-12-22 17:36:19
问题 This question already has an answer here : How to make Texture2D Readable via script (1 answer) Closed 2 years ago . I have a plugin that allows me to access pictures from an Android phones gallery. This gives me a texture of the Texture2D type. I then want to edit it using the GetPixels function, but it is not set to readable by default. How would I make the texture readable so I can use GetPixels on it? Basically I am allowing the user to select a picture from the phone and then crop it. In

Unity3D: is it possible to check the volume of both Android and iPhone devices?

天大地大妈咪最大 提交于 2019-12-22 10:25:59
问题 I have the following code: void Update(){ GetComponent<UnityEngine.UI.Text> ().text = AudioListener.volume.ToString(); } After pushing to my Android device, it always says "1" when I push the physical volume buttons of the Android. So it is not detecting what the volume of the phone actually is. Is it possible to check the current volume of the phone? I'm working with the Google Cardboard SDK. Maybe that's important as it uses several cameras at the same time. Maybe is it something related

Unity How to change the Rendering Order of A canvas

馋奶兔 提交于 2019-12-22 06:56:47
问题 I'm using unity 5.3 and I'm trying to change the Rendering Order of two overlayed cross platform controls which each reside in their own canvas. In previous versions you could bring the window into focus using GUI.FocusWindow(0); However this does not work with the new system. I've also tried modifying the order in the editor window which has done nothing. Does anyone know how I can move a control to be on top of the other? 回答1: After doing some research I found the proper way to change the

.gitignore entire directory with whitespace in name

╄→гoц情女王★ 提交于 2019-12-22 04:56:32
问题 Goal Trying to ignore the annoyingly-named "TextMesh Pro" directory, underneath an "Assets" folder (full path from the root where .gitignore resides is "Sky Labyrinth\Assets\Text Mesh Pro\"). Attempted I followed the suggestions in 3 threads (one, two, three) unsuccessfully. In the actual .gitignore file I tried: TextMesh Pro/ TextMesh\ Pro/ **/TextMesh Pro/ **/TextMesh\ Pro/ \Assets\TextMesh Pro\ \Assets\TextMesh/ Pro\ **\Assets\TextMesh Pro\ **\Assets\TextMesh/ Pro\ "\TextMesh Pro\" "**

How to warm up Android device to 40 degrees via Unity?

非 Y 不嫁゛ 提交于 2019-12-20 12:37:07
问题 I wish to create an Android app that will act as a "hand warmer". I am using GPS calls, vibration, flashlight and I am also using multiple threads to run code in a loop. Battery consumption is high but it is not enough. When I use this app it takes about 10 minutes in order to go from 25 degrees to 33. My goal is to reach 40 degrees in the shortest time possible. So, how can I read the device temp via C# code, and how to reach 40 degrees of heat and stay there? 回答1: You don't need the

Why when Instantiate new GameObjects it's not adding tag to them? [duplicate]

南楼画角 提交于 2019-12-20 07:52:51
问题 This question already has an answer here : UnityException: Tag: is not defined (1 answer) Closed 2 years ago . using System.Collections; using System.Collections.Generic; using UnityEngine; public class Test : MonoBehaviour { public float spinSpeed = 2.0f; public int cloneTests; public GameObject prefab; private bool rotate = false; private bool exited = false; private void Start() { for (int i = 0; i < cloneTests; i++) { GameObject Test = Instantiate(prefab); Test.tag = "Testing"; } } } The

Using new Unity VideoPlayer and VideoClip API to play video

两盒软妹~` 提交于 2019-12-20 07:23:13
问题 MovieTexture is finally deprecated after Unity 5.6.0b1 release and new API that plays video on both Desktop and Mobile devices is now released. VideoPlayer and VideoClip can be used to play video and retrieve texture for each frame if needed. I've managed to get the video working but coduldn't get the audio to play as-well from the Editor on Windows 10. Anyone know why audio is not playing? //Raw Image to Show Video Images [Assign from the Editor] public RawImage image; //Video To Play

How Can I Package a Unity3D 5 Windows Application into a single exe file?

强颜欢笑 提交于 2019-12-20 06:35:19
问题 I am new to Unity3d development. I have created two versions of a 3D puzzle app, one for Mac and the other for Windows. Mac applications are created with the package contents contained within it. The Windows application is created with the exe file and a separate data folder with the same name as the exe file + suffix _Data. I want to create a single exe file to distribute on Amazon and other downloadable platforms. The problem I'm having is finding something where the data folder and the exe

Unity3d restart current scene

落爺英雄遲暮 提交于 2019-12-20 04:36:12
问题 Ok so I am trying to restart the scene on R being pressed and for some reason, I am getting errors like, well in the unity console: "unexpected symbol '}' " and "parsing error". But then in Microsoft visual studio I'm getting "; expected". Any ideas of what's wrong with the following code? void Update() { if (Input.GetKeyDown(KeyCode.R)) SceneManager.GetActiveScene().buildIndex } 回答1: You must ask the scene manager to load the scene using LoadScene if (Input.GetKeyDown(KeyCode.R))