Questions tagged [unity3d]

12965 questions
1

votes
2

answer
11.2k

Views

Unity3D Applying Texture - Model turns black

I am following a course to learn Unity3D. Game Development for iPhone/iPad Using Unity iPhone Tutorials http://www.vtc.com/products/Game-Development-for-iPhone-iPad-Using-Unity-iPhone-Tutorials.htm I am following along whatever author is doing on the screen. He is using Unity 1.6 and I am using Unit...
Dev
0

votes
0

answer
13

Views

Unity Facebook login not works on Facebook App in the Android device

So i implemented Facebook SDK in my project, here the problem is FBlogin not works when i have facebook app in my android device. Please my and my team stuck in this stuff. For more details please replay to this post.
1

votes
1

answer
69

Views

Limit button press in between in seconds?

How to make button press function work only in between # seconds? For example, allow user to press E at any time, but execute, for example, animation every 5 seconds? I've tried Invoke but it doesnt seem to work as it should. I've also tried timestamp and StartCoroutine (waitforseconds). Here's what...
papi
1

votes
0

answer
38

Views

Which of a Dictionary's fields should I make serializable?

I'm trying to implement my own serializable dictionary based on the source code from here. Obviously the keys, values, and count need to be serialized. MSDN says you should never serialize hash codes. But I'm having trouble wrapping my head around the usage of the buckets array and Entry.next field...
SilentSin
1

votes
1

answer
373

Views

Unity freezes at firebase GetAsyncValue().ContinueWith()

I have the latest firebase unity SDK - 4.3.0 My Unity version is 2017.2.0f3 In my script, if I have two calls to GetValueAsync().ContinueWith(), the first one is executed normally and the second one halts. If I somehow merge the two calls into one, the program halts at the first call. I have already...
CCS
1

votes
1

answer
100

Views

Visualize Texture3D with opacity

I want to visualize a Texture3D with see though opacity sections. My Texture3D data works and can visualize using this shader https://github.com/nakamura001/Unity-3DVolumeTexture/blob/master/Assets/Sample3DTexture.shader But would like to use opacity levels. Any help would be highly appreciated. Upd...
bartburkhardt
1

votes
0

answer
245

Views

iPhone App: Camera is not working properly in portrait mode but works in landscape

I am developing an iPhone application using Unity 5.6.4p2 and Vuforia. After build from Unity, opened in xCode 9.2, building and installed it to iPhone 6s/ipad pro (ios11.2). When I open the application in my iPhone/iPad in portrait mode the camera is not opening normally, sometime camera take 10/20...
Saif
1

votes
0

answer
78

Views

Call C function with pointer in Unity3d with C#

I want use a C plugin in Unity3d. Here is the C function which I want to use. DECODE_EXPORT CMDecoderFrame* DECODE_CALL CMAllocFrame(CMDecoderCtx *ctx); The CMDecoderOptions is a struct as following. struct CMDecoderFrame { int nVertex; // number of vertices int nVertexBufferSi...
Dobbie
1

votes
0

answer
175

Views

ARKit - How to rotate the object by swiping?

I use ARKit plugin for Unity in order to place a 3D object on the real world surface. After placing an object, how can I rotate it by swiping my finger over it on the iPhone screen?
Rumata
1

votes
0

answer
273

Views

Unity Cloud Build link with Continuous Integration systems

After a successful build in Unity Cloud Build I would like to send the generated .zip file url to a Continuous Integration system like Travis CI in order to to deploy that file into another server. To do this right now I need to call a custom webhook in my own server that checks (via API) the last b...
Alejandro Morán
1

votes
0

answer
264

Views

Unity UNET - multiplayer + singleplayer programming approach issue

I recently started working on a project that was developed with single-player play in mind for around 3 months. To add multiplayer functionality (simple 1v1 server-client connection) I chose Unet, following mostly Unity tutorials and examples. I was able to change the single player scripts to multip...
Walik
-2

votes
0

answer
13

Views

I need help optimizing my nosie code for infinite terrain generation [on hold]

I am currently trying to generate 'infinite terrain' in unity with optimization problems What I am doing right now is I made a method call GetPointHeight with input values of x position and z position of the vertice in the mesh. There is also a offset value. In that method I generate the height of t...
Breaking_Reality
0

votes
0

answer
6

Views

Issue with singleton being destroyed but only when debugging in Xcode

My project works fine in unity, this issue only happens once I have built it and run it in Xcode. My player object has a singleton attached to it. Switching scenes still causes it to be destroyed (but not any other game objects with singletons attached to them, like the game manager). I found every...
Ashlyn j
0

votes
0

answer
7

Views

How can I grab a reference of a game-object in a scene from a prefab

currently I am working on a Equipment system that will Instantiate Game objects into the scene from a list, prior to this I was not using a Instantiation system with just keeping the Game Objects Active in the scene at all time. Now with Instantiating the Game Object(Prefab) I am running into the er...
Timberghost_
1

votes
0

answer
109

Views

Spawn at certain distance

I am developing a game where I need to spawn an infinite number of planes.I manage to spawn the plane but I want them to spawn at a certain distance from one another, like one unit away from one another.Looking forward to hearing from you. public GameObject[] tileprefabs; private Transform playerTra...
alter ego
1

votes
1

answer
83

Views

Ironpython missing stack frames if executed in scope

If I execute this code: var engine = Python.CreateEngine(); ScriptScope sc = engine.CreateScope (); var ss = engine.CreateScriptSourceFromString ('\ndef f():\n raise Exception('hello generator')\n yield 42\n\ndef g():\n f().next()\n\ng()\n', 'a.py'); try { ss.Execute(); } catch(Exception e)...
Enerccio
1

votes
1

answer
54

Views

touch button - how to?

i'm working on Android touch button can shooting with no luck until now, my need to have button with name fire inside the canvase , can do the following: 1 - when pressed: shoot one bullet 2 - keep pressing: shoots bullets 3 - stop press: hold shooting i need help to update the following code with...
Sa'ad Qasaymeh
1

votes
0

answer
228

Views

Converting between coordinate systems causing rotation/gimbal issues! Need assistance

I am trying to write a .bvh animation exporter for c# and am using this export_bvh.py script from Blender as an example to copy. My Unity exporter script basically stores the bone's rotations every frame when the scene is active. After the scene stops it then saves that list of euler rotations to th...
Logic1
1

votes
0

answer
140

Views

How to solve this type of Unity Game error?

I am testing my unity game in Redmi 4 (Android version 7.1.2 N2G47H, MIUI version 9.1) & I am getting following error in crash report on redmi device. *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'xiaomi/mido/mido:7.0/NRD90M/V9.0.5.0.NCFMIEI:user/release-keys' R...
Neel Gajjar
1

votes
0

answer
61

Views

Unity3d. GetComponent method not working on android buid

I have a problem in Unity3d when running on Android. The script does not find the component in the object found by the tag. What I do: 1) I'm looking for an object by tag in the 'Awake()' method: GameObject timeLineSpanGo = GameObject.FindGameObjectWithTag(KeyStringConstants.InitiativeSpanTag); At...
R. Hanza
1

votes
1

answer
42

Views

Unity rendering

Hello so i want to ask a question i have a sniper and in most games wen you zoom with sniper the gun is gone but i and most people use 2 cameras 1 is for the world and the other is for only weapons so we have a layer weapon and wen i zoom in and lets say i disable the gunCamera (camera that only ren...
drugsandwich
1

votes
1

answer
531

Views

How to separate server-side and client-side code

Is it possible to have separated projects for both client and server in Unity3D by using UNet? As far as I have seen it seems to be impossible, Unity3D official documentation is not much clear on that topic and have found zero examples or articles about that. If you use the NetworkManager provided b...
Alejandro Morán
1

votes
0

answer
58

Views

Not being able to get attributes in the Image component in Unity

I just got the newest version of Unity 2017.3.0f3 and I don't get errors in my console but I get errors when I run a line of code such as this. It was not like this in my previous version and everything worked fine. actionBarImageComponent is a Image variable : What is confusing to me is when I loo...
JoeyL
1

votes
0

answer
238

Views

Player data archive not found at '/var/containers/Bundle/Application/…/GameName.app/Data/data.unity3d' When creating build of unity project in iOS

I'm trying to generate build of unity project for iOS. After switching my unity platform to iOS and click on build button, it generates Xcode project for iOS build. When I try to build my game in Xcode for generating build it shows error in log which is following -> applicationDidFinishLaunching() P...
Farhan
1

votes
1

answer
53

Views

Unity generate 2 different keys with same name in regedit

Simly I am using playerprefs` string saving code as follow: PlayerPrefs.SetString(variablename, variablevalue); Problem But I realized that somehow it generated 2 different hkeys for some variable names but not for others. Question What effects the value added at the end of variable names in reged...
o Ak
1

votes
0

answer
504

Views

How do I compare local and remote asset bundle versions without actually downloading the asset bundle?

What I'm trying to do I'm working on a sort of portal to showcase several of the projects my organization has made in Unity. To keep it flexible and light, I've designed an architecture using asset bundles: When the user downloads the portal, all they download is a bootstrap scene that loads in the...
David Rodriguez
1

votes
1

answer
45

Views

Limited rotation towards mouse

I have 2D game (unity, c# scripts), where is a submarine with tower (parent) and gun (child). look at the screenshot Tower can rotate (when I press A or D) around submarine body. (works fine) Problem is the gun on tower should rotate towards mouse, but only in angle limitation. Angle limitation (by...
DohnnyJepp13
1

votes
1

answer
30

Views

Is it possible to copy remote settings from one configuration to another?

Using Unity remote setting is it possible to copy remote setting from development configuration to release? or just manually typing them.
RoarG
1

votes
0

answer
616

Views

Unity3D WebGL doesn´t show the game

I have tried several forums without any results. I am pretty desperate, so I made a game and built it in WebGL, then I tried to run it locally (on both firefox and chrome) and also put it on a website specially developed for unity web gl games and in both cases it showed only loading with Unity logo...
Samuel V.
1

votes
1

answer
82

Views

Unity3D gives hundrends of errors when building the game

so my Unity worked fine until now, last time I built the game was yesterday and everything worked fine. Since yesterday the only thing that I did is that I changed some colliders and removed facebook gamecenter plugin. Now, when I try to play the game, everything is fine, but when I try to build it,...
Samuel V.
1

votes
1

answer
107

Views

Unity - Firebase Functions are not being called on android

Just a month ago all the code bellow worked fine for me. i could simply signup/login and use the real time database, until today.. i did everything as usually, created a new Unity Project, Switched the platform to android, imported relevant Firebase SDKs for unity, and copied the code bellow which...
Theodor Savransky
1

votes
0

answer
443

Views

Absence of texture on 3D model in AR application made with Unity 3D and Region Capture

I'm working on a little AR coloring book application using Unity and Vuforia. I did something similar a few years back, but now, with the new updates, they changed a lot of things (I'm using Unity 2017.3, Vuforia 7 and Texture Region Capture 2.0.6 available here https://github.com/maximrouf/RegionCa...
patri
1

votes
0

answer
228

Views

Google PlayResolver in Unity Automated Build

I have a repository containing my game, and inside it is firebase messaging and analytics SDK imported from the .unitypackage BUT i don’t have the android dependencies installed (the ones that Play Resolver download i guess using gradle). So in a normal flow using the unity editor, play resolver w...
Martin Gonzalez
1

votes
0

answer
339

Views

NativeShare does not work on Oreo(8.0 or later)

I am developing a game on unity3d and using NativeShare script for sharing. And that script is perfectly working on all devices except those devices which have OREO(8.0 or later). And when i debug my device on terminal i got this exception 'android.os.FileUriExposedException' . Please help me so i...
Ahmad Zafar
1

votes
1

answer
369

Views

downloaded assetbundle is not in Application.streamingAssetsPath

I get the assetbundle by using UnityWebRequest GetAssetBundle(string uri, uint version, uint crc); but Application.streamingAssetsPath is empty.... where is downloaded assetbundle and how to loaded downloaded assetbundle? my Unity version is 2017.3 Thank you vmchar. but I don't know how to use Asset...
BlueStar
1

votes
0

answer
337

Views

NullReferenceException when trying to call a function from another script in unity [duplicate]

This question already has an answer here: Access variables/functions from another script 3 answers What is a NullReferenceException, and how do I fix it? 31 answers The script that I'm trying to run the function from looks like this: public class switchAnimation : MonoBehaviour { public GameObject...
Reza
1

votes
1

answer
113

Views

GetKeyDown doesn't seem to be working. Unity C#

Making a little prototype at work and have been following some tutorials on how to do UI. Everything seems to be working except for the fact that hitting 'space' while playing doesn't pause the game. I added some debug logs to try and catch where it was breaking, but I get no log output when hitting...
Jovis
1

votes
0

answer
48

Views

Read a plist from the document directory of the iPhone in a Unity3d game

How to read a plist file from document directory of an iPhone in Unity3D Read image is sample but I have to read a plist public static string GetiPhoneDocumentsPath () { string path = Application.dataPath.Substring (0, Application.dataPath.Length - 5); path = path.Substring(0, path.LastIndexOf('/'))...
Abs3akt
1

votes
0

answer
106

Views

Unity 5.6.3 internal editor error

i just made clean install of Unity 5.6.3p1(i need it) and the editor is crashing in a loop with error: IndexOutOfRangeException: Array index is out of range. UnityEditor.SceneRenderModeWindow.GetGUIContent (DrawCameraMode drawCameraMode) (at C:/buildslave/unity/build/Editor/Mono/Annotation/SceneRend...
choo84
1

votes
1

answer
265

Views

Unity error prepare 3 VideoPlayer 4K

There is no problem to Prepare one or two (4K) VideoPlayer for Android (Samsung Galaxy S7). But When I try to Prepare three or more (4k) VideoPlayer I get an error AndroidVideoMedia: Error -10000 while configuring codec. and the video doesn't play at all.
yoanng

View additional questions