Scripts break when trying to implement saving????

Hi so I am trying to save my game and when I tabbed back into unity to compile I saw that my scripts got removed from my player, enemys, etc. It also gives me this error when rying to attaching it new:

The script don’t inherit a native class that can manager a script

I have no idea what unity is trying to say me because my scripts work from monobehavior and I don’t know what else to do! Help please!!!

First things to check:

  • The class extends MonoBehaviour. It should look like public class MyClass : MonoBehaviour {
  • The class filename and class name match. I.E. a class called “MyClass” should live in “MyClass.cs”
  • You have using UnityEngine; near the top of the file.

If you still can’t figure it out maybe share one of the not working scripts here along with the filename of the class.

Thats the thing I have checked all of that and everything is as should. Thats why I am so confused. I don’t think that sharing one of the scripts would help, because it worked perfecly before trying to save.

If I’m reading your post correctly, you were making some changes to one or more scripts when this issue happened. It seems likely to me that one of your script changes broke one of your scripts.

Before you tear up too much stuff trying out things, it might be best to start using source control (git works great with Unity!) and put everything into source control right now.

Once it is all committed you can iterate and fearlessly try to find out what’s happening, and once you have it working again you can commit it, and then you will always have a known good way to revert and compare.

Always use source control from day 1 to avoid silly breaks like this!!!