Cloud build failing on git submodules

I have a Unity project in a git repo hosted on VSTS with submodules, I've integrated it the git repo with Unity cloud build. When Cloud Build tires to do a build it seems to go fine checking everything out until it reaches the modules, it hangs on t...
more »

2017-04-16 15:04 (1) Answers

Save Game Using JSON in Unity

I create a simple Save Game system in Unity using Unity's JSON Serialization. My Save Game is pretty simple, I am only saving the position of my character and loading it. The save game works fine, in-game. When I launch the game and click 'Save' the...
more »

2017-04-11 14:04 (1) Answers

Android Plugin UnitySendMessage Never Called

This was working a few weeks ago, but now I've noticed my OnReward message is no longer called from my custom plugin. In my rewardcenter.cs class I call the plugin class to set the listener to the gameObject that this script is attached to (in this ...
more »

2017-04-10 01:04 (0) Answers

Is std::byte in C++ 17 equivalent to byte in C#?

I just noticed std::byte in the C++ 17. I am asking this question because I use the code below to send byte array to C++ to play audio sound. C#: [DllImport ("AudioStreamer")] public static extern void playSound (byte[] audioBytes); C++: #defin...
more »

2017-04-08 12:04 (2) Answers

Use custom Manifest file in Unity?

Im currently trying to program a little game for android with Unity3D. Because I want a visible status bar, I modified the AndroidManifest in the Project Folder (C:\Users\Public\Documents\Unity Projects\ProjectName\Temp\StagingArea) like this : <...
more »

2017-04-08 12:04 (1) Answers

How to write thread-safe C# code for Unity3D?

I'd like to understand how to write thread safe code. For example I have this code in my game: bool _done = false; Thread _thread; // main game update loop Update() { // if computation done handle it then start again if(_done) { ...
more »

2017-04-07 11:04 (6) Answers

Bad saving in Unity 3D with JSON

My source code of voxel terrain can't save the data. I have a 3D char array called terrain and when I save, then it's result is empty json. The result is: {} The source code is: public void TerrainSave() { LoadingSavingClass myObject = new Lo...
more »

2017-04-05 18:04 (1) Answers

Unity Deserializing from server

I have been trying for a couple hours to deserialize info from my server for our high score system. However I am getting an error: ArgumentException: JSON must represent an object type. This is how I am deserializing (scores is of type Scores)...
more »

2017-04-05 14:04 (1) Answers

Procedural terrain programming in Unity 3D

I am trying to get along with procedural generation, I definitely not a pro in unity, however I was following this guide: click and got some results. For now I have 2 problems, I have some basic idea how to resolve them, however I would like to hear...
more »

2017-04-04 11:04 (2) Answers

Deserialize nested xml in c# (Unity-script)

I am currently making a game in unity3D. I have a xml document which contains a number of decks which are populated with various playing cards. The xml-file looks something like this: <?xml version="1.0" encoding="utf-8" ?> <CardCollection&...
more »

2017-03-31 22:03 (1) Answers

Send Message from an exe to another exe in Unity

I have two different executable files running on same computer which has Windows OS. Both of them are build in Unity. I want to send message from one to other without using network. Is this possible with integrated Mono/.net functionality or somethi...
more »

2017-03-28 09:03 (2) Answers

What Units is Input.acceleration in for Unity?

Same goes for Time.deltaTime, etc... Are they all standardized to m/s^2 and s. Would the below code encounter unit mistakes, or work fine? public static void update() { Vector3 a = Input.acceleration; v = v + Time.deltaTime * a; s = s +...
more »

2017-03-25 18:03 (1) Answers

Android Generate Signed Apk error

I tried to generate apk from android studio for first time. I got below error. Error:Execution failed for task ':_3dRunAdventure:transformClassesWithJarMergingForRelease'. > com.android.build.api.transform.TransformException: java.util.zip.ZipExc...
more »

2017-03-22 16:03 (1) Answers

Unity - WWW.text returning null on android device

I am developing an Android app with Unity. But I cannot connect to a internet server with it. Tho this gives false, which is good: Application.internetReachability == NetworkReachability.NotReachable But when trying to execute this snippet: IEnume...
more »

2017-03-13 12:03 (1) Answers

Unity Game will not build with GoogleMobileAds

I have been trying to build my game to iOS for quite some time now but whenever I try to build the project with GoogleMobileAds it won't work. The ads work fine on android but not on iOS. If i remove the GoogleMobileAds completely the project builds ...
more »

2017-03-11 20:03 (1) Answers

How to approach refactoring this code (C#, Types)

First off, my apologies for the title of question. I'm not really sure what it's called that I'm trying to accomplish so I'll just get straight to it. I'm currently developing a game engine in c# using GDI+ and have implemented a components class. T...
more »

2017-03-06 16:03 (8) Answers

not finding android sdk (Unity)

**1)**Error: Invalid command android UnityEditor.HostView:OnGUI() **2)**CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details. C:/Program Files/Java/jdk1.8....
more »

2017-03-01 18:03 (1) Answers

Why are ignored files not being ignored?

So I know variants of this questions have been asked and answered before, so first I want to go through some of my own research to show you that I do not have a duplicate. The git ignore is not actually a .gitignore file: .gitignore is not working...
more »

2017-02-28 21:02 (3) Answers

Will these code be safe in memory in c#?

I have a question about the following code. First, these codes worked well. However, there is no declaration only defined about “courses” in class Student.If in the Constructor of Student the argument is constant, will these code be safe? Than...
more »

2017-02-19 17:02 (1) Answers

Can't start a Handler on the main thread

I'm working on a .jar api to read Google Fit data from Unity3D. The problem that I'm facing right now is that when I want to execute this block of code: private void buildFitnessClient() { mClient = new GoogleApiClient.Builder(myContext).addApi(...
more »

2017-02-10 16:02 (0) Answers