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
1
vote
1answer
20 views

Rigidbody script throwing error CS0246: The type or namespace name `MouseLook' could not be found. Are you missing an assembly reference?

I've been stuck on this for the last 3 days and I really need some help. Now, I have 2 scripts that are giving me some grief, the RigidbodyFirstPersonController.cs and the MouseLook.cs scripts. On my ...
0
votes
0answers
9 views

Centring content within a scroll area

I've got a Scrollbar with a dynamically generated number of entries, and I'm trying to figure out how to get it to act so that there's a lead-in of the first 3 items (example number based on the size ...
4
votes
2answers
1k views

My trigger does not detect my player

My trigger does not detect my player. My Trigger.cs file: ...
0
votes
2answers
143 views

Mesh made in Blender is correct in Unity3D as a rendered mesh, but “empty” as a collider?

I created a simple stair "block" in Blender, and it's rendered correctly, but when I tick "Generate Colliders" and try to use it in a Mesh Collider, there is nothing. (Ps.: I need the real mesh as a ...
0
votes
1answer
29 views

Unity baked lighting - blotchy shadows, bleeding and/or stiching

I have spent days trying to get baked lighting to look good. I use a simple low-poly style. No matter what I do, I get this type of effect (blotchy shadows and odd dark lines): Here are my settings: ...
1
vote
2answers
81 views

Two player platformer game - gameover issue

I'm creating a two player platformer game but facing issues when one of the player dies. So far I have created two players and added the following script to both. The issue I'm facing is that once any ...
1
vote
0answers
28 views

Repeating a mesh instead of stretching it

I would like to put acoustic foam into a case object: To do that, I have created a foam object: Now I'm having a really hard time to cover the case in Unity with this object: I have to adjust ...
0
votes
1answer
13 views

How can I apply setActive to a UI element after an animation finishes?

I have an object animation which plays on the opening of a scene. When the animation is over I want the UI slider to be setActive - allowing the user to rotate the object. I have both these elements ...
-2
votes
0answers
28 views

How do I detect if my player reaches the edge of the screen?

i am working on camera movement and i want to implement it in a way that when player reaches edge of screen, camera shifts left. So is there any way to check if player reaches edge of screen
0
votes
1answer
15 views

What is the physical interpretation of Input.GetAxis(“Horizontal”)?

Actually I want to edit my previous question titled What is the geometrical interpretation of Input.GetAxis("Mouse X") and add a related question "What is the ...
0
votes
1answer
26 views

Get JSON property dynamically in Unity C#?

I'm saving game data into JSON, however basically I can't get property with just string just like in JavaScript. This makes my code to write so many if/switch statements, looks very not clean, hard ...
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 ...
0
votes
1answer
42 views

NPC Melee fighting movement issue

So i have been struggling with this for ages and I have now decided to reach out for help. The Problem: The game has two NPCs for reference we will call them "Ally" and "Enemy" Ally and Enemy each ...
0
votes
1answer
26 views

How can I use a coroutine and GetAxis to rotate a game object?

For the sake of learning about coroutine, I want to convert the following to a cleaner Update that just calls a coroutine. How would I do that? ...
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
23 views

error CS1069: The type name 'ZipArchive' could not be found in the namespace 'System.IO.Compression'

When I build my project, which references the System.IO.Compression namespace, the build succeeds without issue inside Visual Studio. However, inside the Unity ...
0
votes
1answer
34 views

Instant Animation Transitions? Nothing I read about is working

re-imported my character today with 3 new animations (JumpStartState, JumpDownState, JumpEndState) and moved all animation code into the PlayerController script. All of my animations are handled by ...
0
votes
1answer
49 views

Why won't my ball bounce? (Unity, 3D)

I'm trying to do a very simple ball bouncing setup in Unity. I have a sphere with a sphere collider and a plane below it was a rectangular mesh on it, isTrigger set to false for both, and they both ...
1
vote
0answers
15 views

Destroying a networked projectile and creating a client side visual for all clients in Unity?

I'm making a shooter in Unity with UNET, and of course I handle projectile (like arrows) collision on the server. The arrows are Networked rigidbodies with NetworkBehaviours, and I would like to ...
0
votes
1answer
23 views

Animation is not starting even though collider is triggered?

progress is steady but it is a bumpy road. I have removed the animation script from my character and reworked it into the controller script. I have also added new animations. Doing this required ...
0
votes
0answers
29 views

Is there a way to reference Unity UI object inside native code?

Let's say we have a scene in Unity with canvas and InputField on it. Is there a way i can reference my InputField inside native plugin? Maybe i can pass it from Unity?
0
votes
1answer
43 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'...
-1
votes
2answers
55 views

Problem making wave animation

I want to simple wave-like animation using mesh. I thought that it would look like a wave if there would be a point at the middle of the mesh and change z axis of that point, and after this I change ...
1
vote
1answer
18 views

Unity Collider2D is causing the game object to disappear upon collision

I have gone through just about everything to try and isolate this bug. I have isolated it down to the enemy collider, but have not solved the issue. When my player collides with my enemy, the enemy ...
0
votes
0answers
20 views

Tiny Unity for Cross Platform Game [on hold]

I want to develop a game for IOS,ANDROID and FB Instant platform. I want to write code for once, So If I go with Tiny Unity then two issues here, Unity is still in the phase of fully integrating c# ...
0
votes
1answer
63 views

How Can I Load Ads Particular Level?

How Can I Apply Ads Different Level?? I Create A 40 Level, Ex: Level1 complete then load ads Interstitial Level2 complete then load ads Interstitial Level3 complete then load ads Rewarded Level4 ...
1
vote
1answer
62 views

Show/hide soft-keyboard on demand

I'm writing simple chat-app using Unity. The problem with Unity's default implementation of soft-keyboard visibility is that it hides itself when i'm clicking outside of keyboard panel. What i want is ...
1
vote
2answers
42 views

How can I open source my Unity project when I use third party assets?

I know you are not allowed to open source a Unity project that contains asset store items that are either paid or under the default license. I am just wondering if there's any way to make my git ...
0
votes
0answers
20 views

Unexpected collision between two gameobjects [duplicate]

I can't find out why my Cube gameobject sometimes collides on transition right between two gameobjects (blocks), which are the same height, material and so on. See the gif below (note, the colors are ...
0
votes
1answer
46 views

What is the geometrical interpretation of Input.GetAxis(“Mouse X”)?

According to the documentation, Input.GetAxis("Mouse X") produces a range of values from -1 to ...
0
votes
0answers
23 views

Unity Webpage Display - Version Issue

I'm attempting to use the following with the most recent version of Unity: https://bitbucket.org/vitaly_chashin/simpleunitybrowser/src The plugin works perfectly within the editor, but when building ...
-5
votes
1answer
49 views

What is the unit of time in Unity?

In Unity what is the unit that time follows ? (milliseconds, microseconds or seconds?)
1
vote
1answer
21 views

Getting center cell of Unity3D's isometric Tilemap, the resulting position offsetted by a distance?

I am new to Unity3d's Tilemap system and found a problem I couldn't figure out at the time of writing this question. What I want to do is to create a bunch of GameObject overlaid in each of the tile's ...
1
vote
0answers
18 views

Unity shows only admob test ads

Unity shows only admob test ads. I changed adunitId device id and removed test device but it still shows test ads real ads not shown. Please help me about the problem. Thank you
0
votes
1answer
37 views

Card flip animation in a prefab. How to flip with local position?

I'm making a simple card game, with some cards laying on the table. I want to flip the card when it's clicked, so I thought I'd use an animation to do it (lift card up in the air, rotate it and lower ...
0
votes
0answers
25 views

What is the difference between HDRP materials and normal materials [duplicate]

I want to understand these materials I am always confused of using HDRP materials that which one is used for low texture which one is for high texture, for glass, for particles and many other.
-1
votes
0answers
41 views

How can I apply a ScaleIn / ScaleOut effect to an obstacle?

I'm working on a 2D game. How can I apply a Scale in & Scale out effect on an obstacle? Code: ...
0
votes
0answers
26 views

Limit the length of drawRay doesn't work

I want to draw ray to check how my raycast works in Unity editor. However all above code doesn't seems to work, drawn ray is always super long. ...
0
votes
1answer
31 views

How can I take screenshots with two cameras simultaneously in Unity?

I am trying to capture different parts of a scene created in Unity. I have two cameras capturing different parts of the scene. Now, I need to take screenshots using these two cameras simultaneously. ...
0
votes
0answers
13 views

Isn't `PhotonNetwork.Time` supposed to be different in every `FixedUpdate` call?

I noticed that PhotonNetwork.Time can stay unchanged for several FixedUpdate() calls (sometimes up to 10-15 in a row). It seems ...
0
votes
1answer
13 views

Need to separate textures for Unity prefabs

I'm a beginner at Unity and so I apologise if I'm asking a really stupid/simple question. I have a number of 3d objects that were exported from a Blender project an then imported into Unity. I ...
0
votes
1answer
23 views

Unity Editor - Adding Object Fields on button click

So I am trying to make a button that will spawn an object field and a float field when clicked. Each object field being unique, so I can add gameobjects to it. I can’t think of a way to do this. This ...
2
votes
1answer
54 views

Unity character vibrates during idle animation

My player character vibrates in his idle pose for some reason. He has 3 animations (IdleState, WalkState, RunState) and the latter 2 run smoothly, but when I don't provide directional inputs and he ...
-1
votes
0answers
20 views

Canvas image should not influence lighting [on hold]

I would like to insert an image on a Canvas into my HDRP scene. This image should serve as the background of a 3D scene. It should not affect the lighting. It should be ignored the FX and the lights. ...
0
votes
0answers
18 views

Asset with blinking lights/buttons for Unity?

I'm working on a number of assets that will have blinking lights on them. I'm trying to determine how best to set these up for use in Unity. For example, if I have a control panel with light-up ...
-1
votes
0answers
26 views

How do I make my character walk on a platform without falling?

I'm developing a game where the player has automatic movement, it's a platform game. I need my player to when it walks on a platform it doesn't fall when the platform ends (I want the player to turn ...
1
vote
0answers
36 views

Where and how should I check for collision in multiplayer game?

I'm making a multiplayer game. For now, I added a script to towers and I have booleans to change using OnTriggerEnter. When triggered, client sends a message to server and towers health starts to get ...
1
vote
1answer
40 views

Layout problem when implementing chat UI in Unity

I want to implement UI layout in Unity: And here's what I've already done in Unity using an scroll view and putting a Vertical Layout Group and a ...
-2
votes
0answers
44 views

Button Mashing Project Unity C#

As the title states I'm trying to create a button mashing script for a simple button mashing game where the player mashes any button on their keyboard to punch a ragdoll infront of them. I want every ...