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
0answers
2 views

Color bands over tile when scaling texture in shader

I want to have tiles with different sprites on the back. Initally I thought I will mix two textures together and then apply mixed texture to game object. I thought that should be easy, but google ...
0
votes
1answer
27 views

How do I create a single tile in Unity 2019+

I going through the "Ruby's Adventure: 2D Beginner" tutorial, chapter 4, section 3 with Unity 2019.11. In the tutorial you create a folder for tiles and you are then supposed to right-click in the ...
0
votes
0answers
13 views

Converting heighmap coords to world coordinates, or Masking areas of terrain for object spawn systems

I'm trying to mask out areas of my terrain so I can "zone" object spawns. For example, I want to spawn branches and logs randomly on a beach over time but I need to clearly identify "beach". My best ...
1
vote
0answers
41 views

How can I cut a doorway through my wall at runtime?

I am working on a Unity project where I have 3 models: a stacked, rounded wall (think logs), a flat wall (think bricks), and a door. The door has an animation to open / close itself, and when it's ...
0
votes
1answer
22 views

Unity Error importing any video clip

When I try to import a video file to play in a VideoPlayer component, I get the following errors in the Console: ...
0
votes
0answers
28 views

The doors lock system is working fine but how can I avoid changing the colors all the time in the Update?

I want it to change the doors lock state but also the colors of the doors Red = locked Green = unlocked either in editor mode or in runtime. But if the method that change the doors colors is not ...
1
vote
0answers
36 views

how to make a seemingly endless backdrop in Unity

Potential solution at the bottom. I have a rocket which flies straight up, as it gets higher you can see the edge of the terrain. I want the rocket to eventually leave the atmosphere and then the ...
0
votes
0answers
14 views

Multi pass Surface - erro syntax

I'm trying to make a multiple pass using two [blending] for each one, but he accuses in one place, there is nothing, I don't understand why Parse error: syntax error, unexpected TOK_PASS, expecting ...
0
votes
0answers
33 views

Questions about Jrpg NPC events (Unity C#)

So, I'm trying to wrap my head around something. I've got my basic quest system up and running for my rpg style game. Right now I'm taking a look at NPC events and triggers that as I see it have two ...
1
vote
1answer
41 views

Optimizing spawning 500 objects every 3 seconds

Using Object Pooling, assuming I'll like to spawn 500 cubes once every three seconds. How do I make it performance friendly? I need ideas, not the code itself.
0
votes
0answers
13 views

Unity 3D Google Play Services error when building for Android on API level 29

Unity 2019.2.11f1 has been giving me error when I select the API level 29 (Game does not build and while playing throws an error message mentioned bellow). I tried many Unity versions, updated Google ...
0
votes
1answer
21 views

How to make a new powerup reset the WaitForSeconds from previous powerup?

I'm making a game where the player is pushing objects outside a plane. Every round there's an additional ball (GameManager.cs): ...
0
votes
1answer
22 views

How can I adjust the direction of my rigidobody.velocity without stuttering?

Stuttery movement has been plaguing me for the whole development of this project. Some info on the game: It's a 2D, top-down space game, and you control a spaceship that can accelerate or rotate. If ...
0
votes
0answers
20 views

Unity change scene with button

I already understand how to do this but the problem i'm having is: When i go from "MainMenu" to "Level01" and then back the buttons lose there reference. What can i do to fix this? ...
0
votes
1answer
18 views

How to stop counting point when player dies (Destroy)

In my game, I'd like to stop counting points when the player's y is -4. When the pink and red balls fall off the Plane the player gets points. But it seems a bit strange to be able to collect points ...
0
votes
1answer
17 views

How to avoid game starting before start button is clicked?

I've made a game with a Title Screen (Canvas), and a Start Button attached to the Title Screen. Points, GameOver, Restart, and even the Start Button sort of works, but it's possible to play the game ...
0
votes
2answers
24 views

Issue with Canvas Background?

I'm preparing a 2d game. I'm working with particles, the problem is my particle is displaying on the obstacle and also a problem with level text see the reference image: and the second issue is when ...
0
votes
2answers
29 views

Recursively find neighbors

I'm making a Bubble Shooter game in Unity. I came to the point where I can hit another bubble and it destroys all of its neighbors. Now I'm trying to use recursion to destroy all of its neighbors ...
0
votes
2answers
21 views

unity: input event consumed by image raycast target that is “under” a sprite with a 2D collider

I am having a hard time getting my UI to work. Basically I have a canvas with a UI image A that is the size of the screen. This image has raycast enabled and if effectively receiving inputs. Not in ...
0
votes
3answers
49 views

How to use GameManager to get GameOver() from another script?

I'm trying to make a gameover-text show when the player is leaving the plane-area. In GameManager.cs I've written: ...
0
votes
0answers
8 views

UGUI canvas and NGUI panel overlap- set sorting order

I have a NGUI dropdown panel and a UGUI (Unity UI) panel. All are working fine but there is a small problem. When I open the NGUI dropdown panel meanwhile my GUI panel is also open, then NGUI dropdown ...
0
votes
0answers
13 views

Communication Between Client and Seperate host Unity Unet

I building a realtime multiplayer game like a small quiz game that players can able to join the game and then quiz master who handling the host will launch the game. I need to that how to do this ...
0
votes
0answers
21 views

How to have a point light with no falloff in Unity 3D?

Does anyone know of a good strategy to make point lights with no falloff, eg. anything in the radius of the light will be 100% illumination while anything outside the radius will be 0% illumination. ...
0
votes
0answers
17 views

How can I push a button with VR hands?

New programmer here. I am currently trying to create a sample game in Unity (2019.2.11f1) where I push a button using the VR hands of my Oculus Rift (the hands follow my controllers). I can't believe ...
0
votes
1answer
31 views

Tilting a game object left/right/forward/back with gyroscope, regardless of player's heading

I'm working on a mobile game in Unity and using the gyroscope to rotate an object along the x and y axes. ...
0
votes
1answer
18 views

Wwise: play specific audio clip without specific event (for dialogue)

Is it possible to play a specific audio object in Wwise without having a separate event for it? I'm implementing a dialogue system, and I have thousands of audio clips for dialogues, and making an ...
0
votes
0answers
24 views

3d physics framework/engine for simulating virtual creatures [closed]

I want to recreate this project. In order to do this, I need a 3d graphics + physics framework/software that contains the following features: It has Rigid body physics + joints + springs It is low ...
0
votes
0answers
31 views

How can I modify the transparency n the shader?

I'm learning how to use transparent surfaces. I am using a texture with black background, but any change in transparency is not showing, what I am doing wrong? Here is my shader code: ...
0
votes
0answers
17 views

Unity Giving following error : NullReferenceException: Object reference not set to an instance of an object [duplicate]

im going to probably look really stupid and i will be no means admit this is my code however i cant seems to get it to work so i was wondering you you might be able to? I'm getting the following ...
0
votes
1answer
32 views

Why are Visual Studio and VSCode not giving me a dropdown list of methods and options etc?

I am using VSCode but I have also tried Visual Studio 2019 to write code for Unity, but when I'm writing the lines I don't get dropdown menus with for example the methods this class holds. Or objects. ...
1
vote
0answers
32 views

How can I unpack texture data following a 16 * 8-bit pattern?

Is possible to unpack texture data following a specific bit packing scheme? I have read that texture data in HLSL can be read in as 4 floats of 32 bits each totaling 128 bits. The packing scheme I'm ...
0
votes
0answers
18 views

Unity - Logic for saving and loading objects with both static and dynamic data

I need help to get some structure for my save and load. I am making a city builder, so I have Buildings thats need to be saved. Each building has a lot of static Data, for example ...
1
vote
1answer
59 views

Why is my player not giving a knock back when it stays at the right side of the enemy?

So, I have this problem I am facing, for some reason my player does not get a knockback when it stays at the right side of the enemy but when it stays at the left side it gives a knockback. What's the ...
0
votes
0answers
39 views

Character not collecting animated coins

I am trying to make a simple game where the player jumps and collects animated coins. For some reason, my character is not collecting the coins at all. The player just stands in the middle of the coin ...
1
vote
1answer
36 views

How to play two 2D animations at the same time?

I have a "burn" animation and a "poison" animation for when the player is burnt or poisoned respectively. I want to play both animations at the same time when the player is both burnt and poisoned. ...
0
votes
0answers
27 views

How to start with Game Dev career with C# and Unity? [closed]

I'm a C# and Angular software developer. I'm trying to learn more about Unity, because I know C#. I'm been wondering how to start with game development and how to get a job in one enteprise?
0
votes
0answers
43 views

How do I make my 3d cube move left and right with buttons in Unity with RigidBody.AddForce?

How do I make my 3d cube move left and right with buttons in Unity with RigidBody.AddForce()? I can't figure out how to do this in Unity! I'm trying to make my game ...
0
votes
1answer
18 views

Can't open scripts in Unity 2019.2.11.f1 version

I'm using Visual Studio 2017, Unity Hub to 2.1.3 and just created a project using Unity's 2019.2.11.f1 version. Once trying to open a script in Unity, it doesn't open and then I'm forced to use Task ...
0
votes
0answers
20 views

Switching between meshes vs Loading only specific mesh

I am currently developing an online multiplayer game on Unity. In the game, the character of each player will be assigned its mesh after the game receives parameters (their meshes' names) for each ...
1
vote
0answers
38 views

RTS Pathfinding without collision between units Options

Ever since I made my units move to a certain location a problem has popped up that of course if I try to make two or more units go to the same place they fight for the same spot. Am I just being ...
1
vote
0answers
70 views

Using a timer in conjunction with two push buttons from Arduino input

noob here So I am using two push buttons (connected to an Arduino Uno) as an input to my game. The player has to push down both buttons at the same time for the character to move in the game. I want ...
0
votes
1answer
33 views

How can I use websockets in a Unity WebGL project?

There are plenty of good Websocket APIs for C#, but I run into trouble when targeting Unity WebGL due to this restriction described in the Unity documentation: No direct socket access Due to ...
0
votes
1answer
73 views

How can I simple use global or individual bool flag/s?

...
0
votes
0answers
31 views

Occasional lag-spikes in performance in heavily optimized game (profiler screenshots included)

So I've been working on a mobile-based platformer for a few years now. I've spent more than a year optimizing the game for mobile as much as I could. Almost every single one of my meshes are using ...
0
votes
3answers
51 views

How to run code selectively only when a specific trigger collider has been hit

I have 2 objects both with trigger colliders. The first object has only 1 trigger collider (imagine this to be a sword). The second object (a person) has multiple colliders. One is a non-trigger ...
0
votes
0answers
50 views

Why the doors lockstate is all the false?

The goal is to change the doors lock state in the editor mode and also in run time. It's not working either in run time or editor mode. The problem is in the HoriDoorManager in the Update. The method ...
-1
votes
0answers
52 views

Using two push buttons as an input to Unity from arduino

noob here So I am trying to use two push buttons from an Arduino Uno to move a character in Unity. Both buttons have to be pushed down for the character to move. Right now I have gotten the code to ...
0
votes
1answer
23 views

Unity ceiling light issues

I'm trying to get back into Unity and I've been playing around with lighting. I modelled a simple lightbulb in Maya and have been trying to create a hanging ceiling light but I'm struggling to get it ...
0
votes
1answer
15 views

Unable to edit tile sizes in unity

I'm trying to change the size of sprites in unity to fit the palette. Except there are no options to change multiple sprite sizes at once. But when I watched a youtube video on tilemaps and palettes, ...
0
votes
1answer
14 views

Unity Tile pallete isn't appearing in window tab

I'm trying to add a tile pallette to my scene in Unity. But when I go to Window - 2D there is no tile pallette option I'm using v2019.2.11f1 (Personal)