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.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

how to reset etsa function GetJoystickNames in unity?

the problem is that if I connect a command the array GetJoystickNames increases an index but if you disconnect it does not reduce the index and continues counting as if it were connected
-2
votes
0answers
27 views

detect inputs in unity?

I have a command of ps4 and I need that if it can be played with it and if the command is not connected the keyboard is activated. What I would like to know is how to detect if an input is connected ...
0
votes
1answer
44 views

if rotation < -45 && > -140 issue

I have a problem with this if statement. If the rotation is < -45. And > -140 Then this statement would be true when the rotation is = -90? And it would be false if the rotation is = -170? I'm ...
1
vote
1answer
89 views

Peer-to-peer Multiplayer Game [closed]

I built a casual game where the user answer the right word in random question. Now I want to make this game multiplayer (4 players) working on smartphones and tablets (Androird & iOS) where all ...
0
votes
0answers
11 views

LOD For Large Complex Mesh (and Blender)

I've done some pretty thorough digging and I can't seem to find any info on what I'm looking for. I'm really hoping that doesn't mean it isn't possible... so if anyone can provide me with any insight ...
0
votes
2answers
41 views

How to reference a GameObject from the Scene Hierarchy in C#?

I am a novice in Unity. I have a Game Object named 'courtsuit'; you can see it in my Scene Hierarchy panel here: I added that object instance to my scene by dragging an OBJ file from my Project ...
0
votes
1answer
29 views

Mouse drag rotation script doesn't work when attached to OBJ model

I am new to Unity. I imported an OBJ model and assigned materials to it. I want to rotate it using the mouse in the game, using this script: ...
0
votes
1answer
24 views

Gameobject stops moving or gets stuck when colliding with another GameObject

I'm currently making a brick breaker style game. My issue comes when the ball is launched off the pad it gets stuck in between two blocks. I have all the blocks on a "Foreground" layer with an "Order ...
0
votes
0answers
19 views

3D player movement with Unity's new input system

So, I trying to get used to the new Unity input system. "Back in the days" I just got the Vertical/Horizontal axis, put them into a Vector3, multiplied them by a certain value and then moves the ...
0
votes
1answer
74 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
1answer
32 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
0answers
27 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
1answer
54 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
0answers
44 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 ...
0
votes
1answer
38 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 ...
1
vote
1answer
68 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
0answers
18 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. ...
1
vote
1answer
52 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
1answer
16 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 ...
0
votes
1answer
20 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
45 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
0answers
26 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
61 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
50 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 ...
0
votes
1answer
47 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
17 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 ...
2
votes
1answer
64 views

What to use instead of UNet? [closed]

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
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
0answers
17 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
40 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 ...
0
votes
0answers
18 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 ...
0
votes
1answer
43 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 ...
1
vote
1answer
36 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-...
1
vote
1answer
29 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
60 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
0answers
26 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
1answer
30 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
22 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 ...
0
votes
0answers
14 views

Unity Timeline controls

Can anyone show me how I could play the timeline backwards through code? Like, after Cinemachine has done cut scenes, and I'll want to reverse the whole cut scene back to how it started, how exactly ...
0
votes
0answers
17 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
39 views

UI background animation makes camera render beyond canvas, need fix?

I have a background animation for a menu where I have to make the background larger than the canvas and drag it over it. Even though I am using a panel the same size as the canvas as a mask, this ...
0
votes
3answers
105 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
0answers
14 views

SteamVR 2.2: Trigger not getting detected from Vive Tracker in Unity3D

I have connected Vive Tracker to a Gun via Pogo pins. I have set Vive tracker as "vive tracker held in hand". How do I get to know when the trigger is pressed. I have tried everything. I created a ...
1
vote
1answer
32 views

Unity - Blender models/animations showing gaps

As part of a college project, a member of my group has made some simple chests with an open animation. Importing these into Unity though, I instantly noticed there were gaps where the faces should be. ...
0
votes
0answers
15 views

Why isn't my custom unity skinned mesh implementation working properly?

I'm creating my own scripted implementation of a Skinned Mesh in unity for collision detection. But I've run into some problems whenever I update the vertex positions using the update armature ...
-1
votes
1answer
31 views

how to set the first color of the list in the sprite

...
0
votes
1answer
61 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 ...
1
vote
1answer
106 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, ...
2
votes
0answers
15 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
57 views

How do you partition a level and create screen transitions out of these partitions?

The levels in Castlevania games, you walk forward and then come to a point on the level where the screen stops scrolling but is not a deadend and there's no door either. They just wanted to transition ...