Enemy Spawn System Glitch
@Mavina helped me out with a system of mines and created an editor script however this editor script is kind of glitchy. Some times in my game it will not automatically assign the player prefab to the enemy unless I actually click on the prefab itself and whenever I build the game it just will not work. The enemies just stand static. Can anyone help me out here? It would be greatly appreciated! The script is linked here
You're going to need to post some code, any errors that you get, and some detailed repro steps in order for anybody to have any idea what's going on.
It sounds like a serialization issue to me though, like maybe the script isn't setting the enemy asset dirty and/or calling AssetDatabase.SaveAssets()
.
Hi there, thanks for you time out of your day to help me.
I am creating a game that has an enemy spawn system which spawns enemy prefabs and automatically assigns the players transform so they can start to talk towards the player. The enemy script will be linked here, player script here and enemy editor script here.
Have that being said I do not think it has anything to do with the scripting rather the odd file organisation I have. This is a university project in which we were handed an existing Unity project to edit. Just so my lecturer would be able to see easily the work I have added I did not add these files into the same folder but rather made a folder before it. I will display the file locations below so it is easier to understand.
Original Unity project location: DayAndNight-GSD2CW > Assets > Day-Night Cycle
Files for my main gameplay location: DayAndNight-GSD2CW > Assets > Jamie $$anonymous$$evan
Some files such as my Editor, $$anonymous$$ain $$anonymous$$enu and other Assets are also located at : DayAndNight-GSD2CW > Assets
Thank you for you time and hopefully I can get this fixed before the hand in :)
Your answer
Follow this Question
Related Questions
Infinite instantiation w/ for loop? Please help! 1 Answer
Enemy Chasing player? 0 Answers
Guard AI is off - Please Help! 0 Answers