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

MouseLook Script “Pops” back to the last value when the script is enabled after being disabled or destroyed

I am trying to get a problem with a MouseLook script that controls my camera and a LookatGameObject script that also controls my camera when I want to force the player to look in a certain direction ...
0
votes
0answers
32 views

Issue with button clicked by mouse? [duplicate]

I have panel with some images and buttons. when I click on a button with "gold" name it works, and if I click on any thing other I got error //NullReferenceException: Object reference not set to an ...
0
votes
0answers
32 views

Prefab with Sub-Elements Expansion Button Missing in Project Panel

I have been following along with a course. In this course a GameObject called "Path (0)" is added, this GameObject then has three sub-GameObjects ("Waypoint (0/1/2)"). In the tutorial, the guy drags ...
0
votes
0answers
48 views

Projected Light Cookie Has Its Texture Edges Instead of Spotlight Circular Edges

The projected light of Unity Spotlight on a flat surface is almost a circle: But when I add this light cookie: It renders the following projection: I expect the projected image takes the ...
0
votes
0answers
46 views

FBX model for 2d sprite charachter

I was following along the unity platformer tutorial. https://www.youtube.com/watch?v=9WhZ1svdC3Q It is great. After looking the animation I found that there was a fbx model for 2d sprite character. I ...
0
votes
1answer
344 views

LineRenderer on Mesh surface

Goal: Render distance lines between two points on the surface of a mesh-based primitive (i.e. sphere, cube, etc). Current Solution: Iteratively traverse distance line between two end points and "...
0
votes
1answer
53 views

How can i set OnClick equal to UnityEvent

The Problem I'm making a dialogue system for a small 2d rpg. I Have a Dialogue class with two lists for pages and responses. The response class has a UnityEvent so i can use the ui in the inspector ...
0
votes
0answers
28 views

I cant Instantiate a particle system for the duration of a subroutine

I have a sub routine that lowers the timescale to 0.3 for 2 seconds. while in those two seconds i would like to spawn a trail of particles that follow the player. I can get the particles working if I ...
0
votes
0answers
21 views

Differences between object movement functions

So I was trying to understand the differences between different ways to move an object in Unity and got opposite answers in different places. Here is what I was able to figure out though. I would ask ...
0
votes
0answers
45 views

Can't find the .exe of my game after I built it with unity, why?

I finished a tutorial of a game, then when I built the game to be exported on windows, mac etc..... , I couldn't find the .exe of the game itself even after I have done it as the tutorial says It ...
0
votes
1answer
977 views

Unity3D: Replicating SM64 turning movement into Unity

Brief Summary: I want to recreate Super Mario 64 turning movement into unity without the clunky movement I currently have. And I would also love how to implement the camera rotation system mentioned ...
0
votes
1answer
161 views

Instantiate prefabs at particular vectors using text file (Unity3D game)

I need to read a text file containing two pieces of information on each line, and use that information to instantiate a prefab at the correct location in a Unity3D game (c# script). The locations are ...
0
votes
1answer
92 views

Object jumping when it shouldn't - Input.GetAxis and booelans used - no raycasting - Unity

UDPATE2: I solved my jumping problem without using Input.GetAxis. The final code is at bottom. It's very simple. It uses rigidBody.transform.position with a boolean. UPDATE: Well, despite the good ...
0
votes
1answer
158 views

How is the default value of ContactFilter2D.isFiltering true?

I have a static ContactFilter2D like so: ...
0
votes
0answers
117 views

Send push notifications when realtime database change

How to send push notifications (status notifications) from one user to another? I mean a user of a unity MOBILE game to another mobile game? Both uses the SAME game on their mobiles. Thanks!
0
votes
0answers
72 views

Unity: Get excel type data from an html website

So is there a way that I can use an html page as a database? My end goal is to put everything into an excel sheet that the people I am making the application for want. I need to upload data from the ...
0
votes
0answers
43 views

How to make mobile movement using CharacterController

How can i change my movement for mobile i think left and right gonna work but i don't know what should i do for jump ...
0
votes
0answers
20 views

NullReferenceException until tile is spawned [duplicate]

I have a tile and tile has enemies spawn positions, and spawner script in it. Everything works fine when tile is spawned, my ray hits the collider in tile and enemies get spawned, but my spawn script ...
0
votes
0answers
76 views

Is a final yield return 0 required in corutines?

I have the following code run in a coroutine. I would like to know if the last yield return 0 is necessary and why. Thank you! ...
0
votes
0answers
49 views

How do I disable user input after the player made their choice?

I'm trying to make a PvP minigame where both players have to chose 1 out of 3 options, but to avoid spamming I want to make it so that when a player presses a button, he is locked in that choice until ...
0
votes
0answers
56 views

Unity: how to mimic the lighting of a mesh as seen in the editor view

I have a camera which shows a "bird's eye view" of a procedurally generated mesh like so: Currently in the editor view (right), the terrain looks exactly as I would like it to. However, in game (left)...
0
votes
0answers
73 views

How can I optimise my game and its game objects?

I have a 3D game in Unity and I use blender to design models for it. My game has a feature where if you click a button, an object is cloned. An example from my game is a tree that is cloned around 100 ...
0
votes
1answer
27 views

Synchronized non-local CharacterController's velocity is stuck at the last movement in Unity3D

I have CharacterControllers as players in my multiplayer scene, and they got NetworkTransforms attached, with ...
0
votes
0answers
203 views

How to Create a Blast of Liquid in Unity

I am making a small cartoon-ish fighting game, and one of the weapons is a Hot Coffee Sprayer, which is a shotgun style weapon. How do I create a thick blast of dark liquid to come from it, with a ...
0
votes
0answers
51 views

Season system Implementation system in unity

So I am planning on implementing a seasons system for a 2D top-down game. Each season will have a characteristic terrain feature e.g. summers will have patches of grass spread out .. which I wanna ...
0
votes
0answers
38 views

Collision detection not working on some parts of mesh

Racing game with a single mesh to act as a collider for all the track sides. Recently revised the mesh and now it is behaving strangely. The player correctly collides (bounces off) some parts, on ...
0
votes
1answer
570 views

Unity: Non Power of 2 Textures

I have a texture that is 1024x900. Should I resize it in Photoshop to be 1024x1024 or leave it as it is? What about a texture sized 1000x900?
0
votes
1answer
55 views

Unet Syncing within AR Hololens

I am out of options. I have tried everything I could and no matter what I do, the Transforms don't sync up. I have had multiple solutions that worked in my test, non AR project, but once I put on the ...
0
votes
1answer
181 views

Unity not redrawing sprite, after sprite change

I am making a game where the player mines dirt by walking on it: So, I created a scene and added a bunch of dirt to a grid, from a dirt prefab. When the character walks on a square, it is supposed to ...
0
votes
1answer
469 views

Why does my Vuforia 8.0 AR app work with a PC webcam, but not with a phone camera, and how do I fix it?

I am making an AR recognition app, the first time I have done so in 2018.3. I have installed the database and target info from the Vuforia developer portal. I have imported my model, and created an ...
0
votes
0answers
222 views

Trees made with Unity's Tree Editor have 2 sides: 1 bright and 1 normal

(The directional light lits the side shown at the right side of the picture.) I tried changing shaders, but that just makes the bright side fully dark. I tried changing Ambient Occlusion but that ...
0
votes
0answers
53 views

How to implement Microwave Signals in Unity?

I need to implement microwave signals for object detection in Unity. I know there are raycast sensors in Unity, but can microwave signals be simulated or can a proxy of microwave signals be created ...
0
votes
1answer
16 views

Can Inspector interactions be used with UNET

SyncVar and RPC calls allow a UNET server to send messages to clients, but these messages are not triggered if the server-side change comes from the inspector or a custom editor (and presumably any ...
0
votes
1answer
43 views

Transform inputs don't work

I'm writing a C# player script for a class and when I run, the sound inputs work fine, but the movement inputs don't respond, and I don't know how to fix it. Code: ...
0
votes
1answer
212 views

How can I create a tunnel/parallax/depth effect based on mobile device tilting?

I would like to create applications similar to what's displayed in these videos: VR Tunnel Live Wallpaper for Android The parallax view Part 1 These mobile application are supposed to react to ...
0
votes
1answer
79 views

Why is my ad not showing?

My ad does not appear. I want to click the button and have an ad appear. ...
0
votes
0answers
138 views

why are my 2d game objects passing through each other?

So I've been looking around for a while and can't seem to find an answer for this. I am trying to make a game where you stack shapes as high as possible. I have an OnMouseDrag script so I can grab a ...
0
votes
0answers
84 views

Unity sizeDelta of an Image update opposite to what it should

I have an IEnumerator coroutine in which I call the UIManager script to update the Image size to fit the text size but it doesn't happen. when I use yield return new WaitForEndOfFrame() it sometimes ...
0
votes
0answers
65 views

How to increase or decrease the speed of a gameObject after solving a puzzle?

I am new to unity development and I am trying to make a script where the game player needs to solve puzzles to keep an object moving. How can I make the player increase/decrease this velocity after ...
0
votes
0answers
32 views

Easily get several materials from different objects onto 1 UV map/material?

Im trying to improve performance, and I found an asset called https://forum.unity.com/threads/one-batch-combine-hundreds-of-materials-into-one-draw-call.555643/ that claims to do what I need - which ...
0
votes
1answer
679 views

Unity C# Changing Button Color?

...
0
votes
0answers
404 views

How to drag an object with mouse with collision?

I want to drag a GameObject with the mouse but I need collision. The basic mouse dragging code simply sets the position of the object to the hit.point with an ...
0
votes
0answers
63 views

how do I instantiate a prefab that adds to the score text in c#?

Hello I'm working on a game with random generation, a dungeon crawler of sorts. i need to be able to have an object that when instantiated, adds to the score(the goal is to find all of them as the ...
0
votes
0answers
138 views

Unity Erase Image from mouse pointer

I want to erase the image for mouse pointer in unity. My pointer should be as a eraser. What is I do create the eraser? My sprite is always change because it provide from the server. Please help me.
0
votes
1answer
104 views

Partial object culling without alpha + transparency?

I am trying to partially cull an object which has subsurface scattering. It's simple to do it with an alpha channel, however, using an alpha channel with transparency will disable subsurface ...
0
votes
0answers
351 views

How to zoom image on Unity UI to particular point where mouse cursor is located?

I have some RectTransform on Unity UI. I have already implemented some Zoom functionality but now I need it to zoom to the area where the mouse cursor is located. Currently, it zooms to the anchor ...
0
votes
1answer
388 views

Does transparency work with SSS in Unity's HDRP Lit shader?

I am using Unity's HDRP Lit shader in Shader Graph (all are version 4.8.0-preview) on Unity 2018.3.0b12. I am trying to use both transparency and subsurface scattering on the material. However, it ...
0
votes
1answer
54 views

How would I prevent parts of my player model from displaying on the camera?

The "legs" of my playermodel are shown when looking down. I'm using the Unity First Person Controller template. Character when in Scene view: Character when looking down in Play mode:
0
votes
0answers
22 views

Optimal way to select a random item from a list based on its chance to appear in Unity [duplicate]

I am creating a random object spawning script in Unity with c#, and am wondering what the ideal way to do this task would be. So I have a list of 31 objects or so, of my special class type. Each one ...
0
votes
1answer
412 views

Help with 3D Double Jumping in Unity

I'm having some trouble with vertical movement. I'm trying to add double-jumping but none of the scenarios online seem to be working, and I can only ever manage to get a single jump. Here's my code: <...

1
216 217
218
219 220
255