Linked Questions

2
votes
1answer
110 views

Cannot assign values to variables (?)

I wouldn't say i'm new to unity or programming in general.. but right now i feel so stupid. I have a simple enemy script. I instantiate object with another script, calling SettingUpCreep and giving ...
1
vote
1answer
548 views

Trying to draw lines using LineRenderer from tower to spawners

So I have a tower surrounded by 4 spawner gameobjects. I want to draw lines to all of them using LineRenderer. I wrote the following code to achieve this but for ...
1
vote
1answer
257 views
1
vote
1answer
62 views

swipe control can't destroy gameobject [duplicate]

I tried to make a game where you can destroy something when you swipe or tap. However, it says NullReferenceException & while the swipe control actually works, ...
0
votes
1answer
40 views

nullException issue [duplicate]

I have a problem when I was trying to change a state within my character. I wrote the code below ...
0
votes
1answer
15 views

nullObjectException in OnDrawGizmos Function

I was studding A* Algorithm and it is showing a nullObjectException in my OnDrawGizmos function whenever it finishes compiling the code. Here is my code - can ...
0
votes
1answer
37 views

Unity game crashing when dialogue with NPC initiated [duplicate]

I have 3 NPCs in my "Game". When the player walks up to any of them, they're supposed to have their own dialogue; I've tested this, and they do. I tried to create a display that shows this dialogue ...
0
votes
1answer
215 views

AudioSource NullReferenceException: Object reference not set to an instance of an object

I honestly don't understand what's going on. This was working perfectly fine yesterday. I have a GameObject in my scene that has an AudioSource attached. The AudioSource has a dragged in .wav file in ...
0
votes
2answers
3k views

Add image to button in unity [duplicate]

Sorry if this question has already an answer somewhere, but I've just started to play with Unity and now I'm stuck. :( I've tried a few things ( from here , here and here and others ) but none of ...
0
votes
0answers
19 views

Does anyone know what caused this? [duplicate]

My code was working until the program crashed, then it started showing this. I actually don't know what caused this, but it was working before the crash... I have recently started programming so I don'...
0
votes
0answers
6 views

getting data from an array stored in a different script Unity [duplicate]

LandingScript w = GetComponent<LandingScript>(); foreach (Transform x in w.Waypoints) { allWaypoints[i] = x; i += 1; } i want ...
0
votes
1answer
45 views

Unity Initializing class of a script not working

I have been trying to find a solution for the last couple of hours so please hear me out. At first I got a NullReferenceException, which I resolved(?) by initializing the class first (This is my ...
0
votes
0answers
30 views

Adding Score to score canvas after collision [duplicate]

Simply a player has to move through pipes falling down, once the player moves through the gap it should add a score and increase the scoring after each pipe the player goes through, pretty basic. I ...
0
votes
1answer
19 views
0
votes
1answer
34 views

I keep getting this error when I run my game so far [duplicate]

I have a tags script: ...

15 30 50 per page