Hello guys, I ran into a big error today. All my scripts became missing from the scene view, and on trying to add them back from the asset folder, it keeps saying “Script can’t add VisualContainerAsset. It needs to inherit from Monobehaviour”. I use Unity 2017 version.
How do I fix this please?
Do you have any compile errors or other errors/warnings in your console?
1 Like
How to report problems productively in the Unity3D forums:
1 Like
Also, make sure VisualContainerAsset extends MonoBehaviour, i.e.
public class VisualContainerAsset : MonoBehaviour
If it’s missing that last part, it’s not a Component and you can’t add it to a GameObject.
@PraetorBlue i forgot to check the console since. I just checked now and found the solution via the console. I needed to remove two lines that I added earlier on. Thank you so much!!
@adamgolden thanks i figured it now just now. The errors were actually indicated in the console but I totally forgot to check ma console.
1 Like