We’re rewarding the question askers & reputations are being recalculated! Read more.

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
13 views

Prefabs x coordinate of position is getting mysteriously updated after destroying and reinstantiating them

Project brief I am trying to make a gamified version of to-do where the player enters tasks and is rewarded with points and a tree grows with the progress. What I am trying to do I have a list of ...
0
votes
1answer
15 views

Error CS1585: Member modifier 'private' must precede the member type and name

I've been knocking errors out of my script after working thoroughly through them but this one has me stumped, even though I'm sure it's something really simple. This is the following error that I'm ...
0
votes
0answers
19 views

Can’t find component Unity

so, I want to add a Cloth component. I click on a gameobjects, press “Add Component” in the Inspector search “Cloth” And nothing comes up. From my searches in google, nobody had such a problem ever, ...
0
votes
0answers
24 views

Unity3D) How can i make specific pos on sphere look camera?

Sorry for my english. I added a picture to explain what i want. I want rotate Big Sphere to make the black point locate in front of camera. (to the white point's position) not black point moving, ...
0
votes
0answers
9 views

Assetbundle loading show Received no data in response in Unity 2019.2.9

Recently I have converted my Unity 2019.1.0 project into Unity 2019.2.9 and it is a WebGL project. In the project I am using asset bundle and here is the snippet to load the bundle: ...
0
votes
1answer
17 views

Automate creating ScriptableObjects from project files?

I'm working on a game with a lot of items, which are all based around image files. I'd like to create a ScriptableObject that's essentially ...
0
votes
0answers
17 views

Render Mode “Screen Space - Camera” inflates prefab buttons to no longer fit on canvas, help

Referencing a previous post (link) and using the solution I came across a situation I'm not understanding where when I have the canvas render set to "Screen Space - Camera" rather than "Screen Space - ...
0
votes
1answer
10 views

Pivot not updating programmatically

I have a canvas. It has an empty game object as a child. That object has a RectTransform component. The RectTransform pivot value is set to 0.4, 0.5 (x, y). In some code I wanted to update the ...
0
votes
0answers
36 views

How Lots of ComputeBuffers at Once Affect Performance Unity

How will lots ComputeBuffer instances affect performance? And why? I know that I should call ComputeBuffer.Release() on every <...
0
votes
1answer
25 views

Unity3D - How to “force” rotation over the X axis

When I click to left or right, up or down, I'd like my airplane to rotate over the x-axis, to loop, and at some point over the z-axis in order to end up with the y-axis pointing up (world up). Let me ...
0
votes
1answer
40 views

Coroutine only partially executing

I have a Coroutine that I use to pull and spawn an enemy in my game. This coroutine works perfectly fine, with the exception of the very first call. I am fairly certain this is because I am probably ...
0
votes
0answers
13 views

Move Unity NavMeshAgent at a constant speed

My NavMeshAgent randomly changes speed while moving along it's path. It seems to be slower when a segment of a path is shorter (between two waypoints/corners) or when there are many close continuous ...
0
votes
2answers
21 views

Unity open UI from ScriptableObject

I have a Canvas that has multiple UI Panels in it for an inventory, crafting, etc. To open these panels I currently have a ...
0
votes
1answer
41 views

Rotating a parent rectangle to align child with target

My beautiful drawings will explain better than many words (or at least I hope): The structure: The black rectangle is a GameObject (my weapon sprite). A and ...
0
votes
1answer
25 views

Stream Clients Cameras from Server Side

There's a way to see specific client Camera from server (using RawImage ..) and sync view. I tried RenderTextue, but i didn't find a solution for that.
1
vote
0answers
26 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
54 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
31 views

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

My terrain already exists, and has been painted. 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 ...
1
vote
2answers
78 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
32 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
1answer
44 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
47 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
18 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
38 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
51 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
21 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
27 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
27 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
25 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
19 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
20 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
27 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
36 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
26 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
55 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
9 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
15 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 ...
1
vote
0answers
27 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
18 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
34 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
32 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
34 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
1answer
88 views

Character not collecting animated coins

I am trying to make a simple game where the player jumps and collects animated coins. After collecting all the coins, the scene is supposed to change. For some reason, my character collects the coins ...
1
vote
1answer
38 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
45 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 ...