Category "unity3d"

if Unity will include the chunk of code in apk if I write it in "UNITY_EDITOR"

Example: If I write following code in a Script file. #if UNITY_EDITOR Debug.Log( "I'll print in Editor only.." ); #endif My question is that when creating

How to manually change variables on custom window editor and make it it persistent?

I'm trying to create a custom editor window in Unity that make me able to generate "things". When I open my custom window I want a list (and of course other var

Unity input is not working, how to fix it?

this is my script: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour { // Start is called

MRTK Photon Unity Networking 'AnchorModuleScript' namespace not found

While following the mrtk tutorial on multi-user capabilities, there has been one CS0246 error that I haven't been able to avoid. After importing PUN 2 from the

3d unity c# car reverse direction movement

I need some help in moving my player car in the reverse direction in unity C# scripting. The forward movement is perfect but the reverse movement is totally opp

How to unsubscribe from an event inside of the gamemanager?

In my GameManager script I have a delegate. In my Door script, I subscribe to this delegate. I've tried unsubscribing from it in both the OnDisable and OnDestro

Audio not playing in Unity

I am trying to program a script that when you hit an enemy it plays a sound, problem is I can't get it to play the sound it sees the audio source but my script

How to place multiple spatial anchors and set up path finding in Unity for HoloLens?

I want to place multiple azure anchors and set up pathfinding (like destination point ). I followed the (https://docs.microsoft.com/en-us/azure/spatial-anchors/

What does #pragma vertex vert_img do in a Unity shader?

While I built an idea of what vert_img does by observing results, I would like to read a more theoretical explanation that I couldn't find online. For context,

Awake() and Start()

I see that we can initialize Variable in Awake() or Start() and Awake() will be called before Start(). When should we initialize in Awake and Start to have th

Check for internet connectivity from Unity

I have a Unity project which I build for Android and iOS platforms. I want to check for internet connectivity on Desktop, Android, and iOS devices. I've read ab

QR Scanner won't work on iOS devices (Unity)

Please let me start off by saying I have only been programming for about 2 years now. I am somewhat new to it. I am also more of an Android developer than an Ap

Picking video file on Android 10: Error NdkMediaExtractor can't create HTTP service

I'm using Unity version 2019.4.3f1 I'm trying to load local video file on Android 10 device (Samsung A90) from the gallery but I'm not able getting this error:

Changing the default tag in Debug.Log for Unity 3D

In order to debug the code for android tags are very helpful to filters the logs on the basis of tags. In Unity 3d when we use Debug.Log By defaults all log

Unity3D: Detect if mouse has clicked on a UI element?

This is a pretty simple question, but it seems something has changed on Unity in the last versions answers I've found on the internet are no longer valid, so he

In Unity, how to detect if window is being resized and if window has stopped resizing

I wanted my UI to not resize when user is still resizing the game (holding click in the window border) and only when the user has released the mouse the resize

No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem is available

I want to make an AR foundation project but I keep getting this problem .Can someone helps me please ? No active UnityEngine.XR.ARSubsystems.XRCameraSubsystem i

Using Layers and Bitmask with Raycast in Unity

Unity's Raycast functions has a parameter you could use to raycast to a particular GameObject. You can also use that parameter to ignore particular GameObject.

Shader error in 'TextMeshPro/Distance Field': failed to open source file: 'TMPro_Properties.cginc' at line 126 (on d3d11)

The textmesh pro file is not loading in unity. I am making a project using arcore and due to some issue with textmesh pro I was not able to build it properly.

JsonSerializationException: Unable to find a constructor for unity webgl build

I serialize a class in an azure function app and collect it via response to post in Unity3d. It's a WebGL project and it works fine on Editor but throws excepti