Questions tagged [unity-game-engine]
Unity is a cross-platform game engine by Unity Technologies. Questions should be about programming with the game engine and not usage of the graphical interface. Questions about the usage of the graphics interface are off topic.
unity-game-engine
76,955
questions
0
votes
0
answers
5
views
Unity C# - Public and private properties getting reset between instantiation and start?
So currently I am instantiating an instance of a prefab, setting a property's value on one of its scripts, and parenting it to another game object:
private void PutDownPayment()
{
var payment = ...
1
vote
0
answers
12
views
Unity Auth is not working with firebase to write data
I am banging my head off the wall trying to get a simple user creation flow into the front end of an app im working on.
I have email/password enabled as an auth type.. I can see in my unity logs that ...
1
vote
1
answer
11
views
The code is not compiled in Unity. How to fix it?
When saving/running the script, Unity does not see any changes in the code.
Changes to the code start working only after restarting Unity.
I have not found a solution to my problem. I have to restart ...
0
votes
1
answer
13
views
Agents not moving or getting stuck in nothing with AI Navmesh Unity 6
I spawn agents on my nav mesh and then set their destination to a point in an array of points. The spawning of the minions looks like this:
private void CreateMinion(PlayerNumber player, UnitSO ...
0
votes
0
answers
12
views
Unity - Problems creating full screen image that maintains aspect ratio using Canvas
I am trying to create a background image that covers the entire screen of my phone, while at the same time keeps its original aspect ratio. This means that if the image and screen do not have the same ...
0
votes
0
answers
16
views
pixel position of hud element and mouse in unity
I'm trying to detect if a mouse if over a hud element with C# in unity.
I have hud element taking up about 1/5th of the right side of the screen.
I basically want to do
if mouse.x < hud_element.x
...
0
votes
0
answers
8
views
Animation Parameters in Unity?
My animator window in unity
My code
Does anyone know how to write a code that can change the animator parameters? I tried making something but the variables i made were separate from the ones in the ...
1
vote
0
answers
18
views
How to drag card up entirely from the bottom of the card instead of just the left point?
I'm making a card game in 2D where the player can "peek" at their cards. I am currently using the Book - Page Curl tool and have rotated it -90 degrees on the Z-Axis.
It's almost the result ...
-1
votes
0
answers
22
views
Unity C# using "new Color(0,0,0,1) " doesnt do anything in inspector
So basically, as stated in the title. I have a variable set to
[SerializeField] Color textColor = new Color(0,0,0,1);
and it does absolutely nothing in the inspector. I could set that color to ...
0
votes
1
answer
37
views
How would I reference a variable only in an inherited class?
So for a game I'm developing I'm using a inheritance based finite state system for enemy and boss AI. However I'm coming across a few issues with its implementation.
The base state class is inherited ...
0
votes
0
answers
13
views
Unity compute shader thread syncing issue
So I am writing a marching cubes compute shader. It’s going reasonably well and does work. I am in the processing of modifying it to remove all duplicate vertices. I want to do this in the shader. I ...
0
votes
2
answers
16
views
what is better way change a material in Unity,should i change material.shader or set a Float in shader to control effect?
I want to add an effect to my object, such as highlighting, but I don't always need it.
Should I change the shader of the material when it needs to be displayed, or should I create a '_Llend' in ...
0
votes
0
answers
15
views
Started getting java.lang.ClassNotFoundException: com.android.billingclient.api.PurchasesUpdatedListener
I’ve started getting an error when the Unity app runs on an Android device, on UnityPurchasing Initialize
Unity 2022.3.181, In App Purchasing 4.12.2, Target API 34
UnityEngine.AndroidJavaException: ...
0
votes
0
answers
26
views
why the same unity sorting layer settings showing different result for identical prefab objects?
I am making a 2D card game. Each card is a prefab object, with the rectangular card background in the default layer and the text as a canvas child in the UI layer. I ran into a problem with the text ...
0
votes
0
answers
19
views
Receiving a Firebase Exception When Using AppCheck: no appcheckprovider installed
I'm using Firebase's AppCheck in my Unity game. Right now I am developing for iOS and have decided to use App Attest as my attestation provider. Since the service that I'm authenticating with is a ...