Getting “InvalidOperationException: Collection was modified; enumeration operation may not execute.” [closed]
Closed 19 mins ago.
Getting “InvalidOperationException: Collection was modified; enumeration operation may not execute.” [closed]
Closed 19 mins ago.
Getting “NullReferenceException: Object reference not set to an instance of an object” For Seemingly No Reason
So, i am making a save load scene system that loads data into a .txt file which holds each object. I have a few objects that can be interacted with and they have a script which contains a “ConnectedObjects” List. but it keeps coming up with the error in the title. this is only when loading the scene. here is a part of the code.
Can’t activate attack animation midair while pressing X key while holding W key and notGrounded
It works perfectly fine when the condition is only pressing the X key. The problems arose when I added to hold the W key. it works only 30% of the time.
My character does not do what I expected him to do and I dont know why
I am making a 2d game in unity and I haven’t touched a game engine in months but I found this movement script I had saved which I wrote a while ago, I set everything up and when I was going to try, my wall jump was off. Instead of just going up diagonaly up and sideways like every wall jump mine simply goes to the side at a very not intended fast speed. I really can’t recall if this script was working back then but I dont think I would save something that doesnt work
How can I make my enemy target a player who enters the scene?
So to explain a little further, I want an enemy from scene 2 to target a player that starts in scene 1. I already have a script for the damage and a AI script for the enemy, to chase the player, but I can not make it target the player, because the player starts in a different scene. I have tried to look for multiple youtube videos as well as asked some of my more savy coding friends.
2d walking animations using unity and c#
my script worked fine without walking animations but once i implemented them and used isMoving my player does not move forward and if i press down he goes up
Creating top down shooter and having the bullets move towards the mouse direction indefinitely
I’m trying to create a top down shooter in Unity for a college project and am having an issue programming a shooting mechanic, below is the script for the bullet prefab that’s suppose to make the bullet move in the direction that the player’s mouse was at upon instantiation.
Unity 2D – Rotate Object Around Point to Face Cursor
I’ve encountered a roadblock.
I’m trying to make a hand (just a rectangle) that rotates so the palm is on the cursor. I can handle the extending of the hand, but I can’t seem to figure out to do this.
mspaint diagram of what I need.
DontDestroyOnLoad takes me to the same coordinates in the scene [closed]
Closed 32 mins ago.