Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unity]

Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

1
vote
1answer
68 views

How to draw a diagonal sine wave line renderer

I'm trying to use a LineRenderer component to draw a sine wave from point A to B and I'm using mouse position. However what I did so far is not working as expected, ...
0
votes
0answers
6 views

Ensuring a Recursive method completes in one update tick?

OK so I have a method that calls itself as this was the only way I could think to get the behaviour I needed. Its a tetris clone i am making and this method is for checking for full lines across X ...
0
votes
0answers
13 views

Formula to keep certain amount of space at top and bottom of object

I have created an inventory, it's a suitcase that hosts items (like ammo, weapons etc.). No matter which screen resolution the user has, there always needs to be a certain amount of space at top and ...
0
votes
0answers
8 views

Unity Collider2D - Know the collider type ob the object collider with the other object

I have my GameObject which represents a soldier in my game. It has the following colliders: 1st BoxCollider2D in child named "sword". Is Trigger checked. Tag = Sword. This collider is enable when ...
0
votes
2answers
1k views

How Do I 'Reset' my Render Texture When I Stop a Video Player?

I have a Unity VideoPlayer where I use a render texture with an audio source to play the video. VideoPlayer.Stop pauses the video and resets the time to 0. I want ...
0
votes
0answers
5 views

How do I debug Azure Spatial Anchors with Unity on an Android device?

I've been building an AR app that's already been a pain to debug, because instant preview refuses to work over wifi and usb debugging causes the phone camera to not display on the phone itself. Now I'...
0
votes
1answer
263 views

Lat, Lon and elevation Conversation into unity coordinates

I have came across a very vague project problem and its feasibility report or communication procedures I have to define. And here is the current scenario: I have two applications One is built on ...
1
vote
0answers
27 views

How to enable antialiasing for SVG Images?

My game has vector icons and sprites, like this one: Its quality disappoints me. I guess that antialiasing is disabled here for some reason, but have no idea how to turn it on. The problem is only ...
0
votes
1answer
28 views

What are my options for building a centralized server architecture for a Unity game?

I have made in the past multiple offline game, and would like to make my first online game. I have very basic knowledge of server structure. The game is a multiplayer RTS game, with ONE server (If ...
0
votes
0answers
32 views

Can I detect collision on specific collider?

I'm a beginner with Unity and I'm developing my very first 2D game. My game character needs to have an automatic right/left movement but I'm struggling with the colliders on the walls (I made a ...
1
vote
1answer
24 views

Textures in build duplicated, despite they're packed into atlases

I have a simple SpriteAtlas: "UIAtlas" which is located in the Resources folder. It points to a folder "UIAtlas" which contains ...
-1
votes
1answer
70 views

How can I change position of camera?

I'm working on 3D game, where the player needs to complete 4 play fields called "homes" in level 1, then progress to level 2 which has 4 homes of its own. In level 1, when the player completes the ...
0
votes
0answers
16 views

Dynamic Animation

I want this plane to fly to the blue cube. I want to be able to animate its flight in Unity or in external software. The problem is that I don't know exactly where this cube will be during the game. ...
0
votes
1answer
12 views

Input.GetAxis Vertical - Unity - can i force it to zero upon certain circumstances/event?

I am trying to make my own tetris clone. I have actually got very far into it without running into major problems, but I am now stuck and can't find the answer after searching. Basically I have used ...
1
vote
1answer
38 views

Getting exact time of button/key input

Is there a way to get the time of an input event (a key or button press) to a higher degree of accuracy than the Update call, maybe by subscribing to input events and handling them immediately?
0
votes
0answers
27 views

Input.GetAxisRaw not returning zero after releasing the key

In my WebGL Project here is the way for camera navigation (Movement/Rotation) on Update event: ...
0
votes
1answer
16 views

GameObject keeps snapping to camera size on play

I'm in the process of making my GameObject move when I drag it across the screen using touch. But my current issue is when I press play to test the game, game object snaps to the size of my camera on ...
0
votes
0answers
19 views

How do I make scale of a GameObject persist in Unity?

I'm currently developing a Hololens application and I've used Microsoft's official spatial anchor documentation to create a voice command that can persistently anchor a GameObject in place. So if I ...
0
votes
1answer
33 views

How does Unity's Collider.Bounds work?

From waht I understand, Collider.Bounds are the sides or bounds of the collider of the GameObject (at least for a cube with a BoxCollider). But I got a result that I wasn't expecting when I tried ...
1
vote
2answers
59 views

how to change value of variable only once?

I am building simple platformer game in which the player hops on to platforms and the speed of platforms increase per time. This is an endless game and depends on the high score system. But, the ...
0
votes
1answer
52 views

How to implement a component-based model for menus in Unity?

I'm trying to create a "sims-like" context menu when an item / game object is clicked. This comes as an add-on question from this question: How to design context menus based on whatever the object ...
0
votes
1answer
109 views

SerializedProperty to UnityEvent in a Custom Editor

I am making a Custom Editor for a type that includes a UnityEvent property. I'm currently facing an issue in converting a SerializedProperty to get that UnityEvent. Here is how I declare the event ...
2
votes
0answers
8 views

Blending Modes in LWRP Particles

I created a particle effect using a material created from Particles/Simple Lit shader with an image of white circle tinted red through Start Color setting. On the left I have Alpha Blending Mode and ...
0
votes
1answer
94 views

WebGL Freeze for some minutes after loading asset bundle

I have to Load/Unload models from a specific URL based on player position. For this reason I am checking player position from model and then load/unload related piece of model in a ...
0
votes
0answers
20 views

I have changed my Unity and Vuforia version and have a compile error

what should I do to fix the problem? Trasncription: ...
0
votes
1answer
31 views

Textmesh Pro conflict in Unity2019.1.5f1

I'm having an issue with Textmesh Pro in my project. I originally got it from the Asset store a few months ago. More recently, I deleted it and downloaded it from the Package Manager. However, now in ...
0
votes
1answer
38 views

How to remove an element from the scene while keeping it in array?

I combined cube meshes to make a big one. I stored the info of every cube in an array within a list of chunk. Now i want to delete the cubes in the scene to only keep the combined result, but without ...
1
vote
0answers
14 views

Simple networking, now that UNet is deprecated [duplicate]

I'm prototyping a two-player typing game in Unity. I don't have any experience making multiplayer games, so I'm not sure how to best approach the netcode. For this game all I think I really need is ...
0
votes
1answer
367 views

Trying to load .json questions and answers into a multiple-choice quiz game in Unity

I am developing a Unity game which includes a multiple-choice quiz. I've placed what I believe is a properly-formatted .json file (the quiz question, four answer choices, the correct answer, and an ...
0
votes
1answer
243 views

Loading a list of items from JSON, all entries are null

(I posted a very similar question here recently and the response I received was helpful. But I have been advised to start a new question, and here it is.) I am developing a Unity game which includes ...
2
votes
1answer
46 views

What to use instead of UNet? [on hold]

If you look at this Link you'll see UNet is deprecated and will be removed in the future. I'm developing a mobile multiplayer game, i've red official advise about it but they say "You can publish it ...
0
votes
1answer
26 views

Unity3d crash on Launching on Ubuntu

I have a problem that bugged me for quite some time now I'm trying to Install Ubity3d on Ubuntu I Followed some instructions that i've found after some research I downloaded and installed UnityHub and ...
7
votes
8answers
5k views

Check if OpenVR / SteamVR / OculusVR headset is mounted on your head

The Oculus and the Vive have this light proximity sensor that detects whether you have your VR headset placed on your head currently or not. Is there any way to tap into that for our own game checks? ...
0
votes
0answers
14 views

What image size/resolution is best for a 2D Mobile Dress Up Game [duplicate]

I have begun the process of making a 2D dress up games (i.e. Pastel Girl and Cute Girl Avatar Maker). Majority of the tutorials I have seen always include things like game physics, but I don't need to ...
0
votes
1answer
1k views

In Unity for Android, how do I create touchable buttons?

I'm making a test game for Android in Unity 5, and I want to add left-right control buttons like the circles below, to move an object left or right. (source: raywenderlich.com) How can I do this? ...
-1
votes
0answers
21 views

Unity - Parameter does not exist

I've tried asking on the Unity forum, but as always, I little to no response, and this is really frustrating me. I've never had this issue before when setting up animations or Animation Controllers. ...
0
votes
1answer
17 views

How to set up Azure Spatial Anchors with Unity Android project?

I'm building an AR app in which I wish to use Microsoft's Azure and it's web service Spatial Anchors. I cannot seem to get the sample demo, which I downloaded from https://github.com/Azure/azure-...
0
votes
0answers
8 views

How can I update my materials to work with LWRP?

I'm using Unity 2019.1.6f1. When I open a new scene with the LWRP template project, I see errors from all materials in the scene. For example, the Jigsaw appears in my scene but in console window I ...
0
votes
1answer
74 views

Adding text to gameobject

I'm trying to create a falling word game like z-type (code here). I have created 3 game objects and I want the words to be added as text to these game objects something like a health bar is added to ...
0
votes
1answer
54 views

Alternate Answer for collision problem?

I am building a top-down game in unity which works well. In this game, I have a 3D object (red cube) which a player has to control and there are other cubes like white, yellow and black cubes which ...
0
votes
1answer
54 views

Unity Menu navigation using keyboard/controller input?

I am trying to create a character stats menu that uses keyboard/controller input to navigate between options instead of the mouse. I have not found any tutorials for this kind of UI navigation. In ...
0
votes
0answers
15 views

Animation Rigging - Create an animation on editor

With the package "Animation Rigging" is possible to download the samples. But in the "animation window" it show the animation only with FK and not with IK. With the package "Animation Rigging" is ...
1
vote
1answer
26 views

Using grids from a different script

I suspect there is a very simple answer to this one but I have been scratching my head trying to figure it out for a while. I have this piece of code that works fine. It effectively adds the location ...
0
votes
1answer
3k views

UV World mapping in shader with Unity.

Please refer to this Answer. DMGregory script is working for me, although I have a problem I can't fix because I don't talk shader :) The tiling will be applied correctly on geometry aligned on XY ...
0
votes
0answers
12 views

“Leap Service not connected” in Unity3D, connected in SteamVR

I'm having trouble to use Leap Motion with Unity3D on one of my machines. Unity doesn't see Leap Service running : Leap Service not connected Both computers run ...
0
votes
1answer
26 views

Unity - SpriteRenderer. Trying to make sprite from code using Texture2d.whitetexture

I have been trying to write a method that fills a rectangle with a color. I've tried it as a new 2D and 3D project just in case, but this gives the same results. Basically, i want the script to make ...
0
votes
0answers
19 views

Emerald AI animal not fleeing

Hey guys I have set up a =n animal to be a cautions cowered but he stops instead of running away. I am using unity version 2018.3.11 with emerald AI 2.2. Here is how I have the scene set up : Emerald ...
0
votes
3answers
73 views

Count the number of Vulnerable and Invulnerable crops

I have this code that counts how many GameObjects (crops) in the scene GameObject[] crops; and the code to get the health component of each crops ...
0
votes
2answers
56 views

change one object into another, and then back again in Unity

For example, I would like to change a cube into a sphere, then change that sphere into a capsule, by pressing the up arrow. I would also like to be able to change in the other direction. Change the ...
0
votes
0answers
20 views

Check whether an object is fully inside/overlapped by other objects in Unity3D?

I have structures made of voxels (cube gameobjects), and I want to make complex structures from them. But I don't always want to place them on the grid. I want them to be more realistic, like ...