Behaviour Missing in empty Scene,Behaviour Missing Warning on empty Scene
Hello everyone.
I got the strangest warning, even when creating a completely fresh scene. All I do is add a Script to an empty GameObject with:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LoadTest : MonoBehaviour {
void Start() {
Resources.LoadAll("", typeof(GameObject));
}
}
and get this warning:
The referenced script (Unknown) on this Behaviour is missing!
UnityEngine.Resources:LoadAll(String, Type)
LoadTest:Start() (at Assets/LoadTest.cs:7)
I tried everything from "Reimport All" on all assets, to running the "FindMissingScripts" http://wiki.unity3d.com/index.php?title=FindMissingScripts with no results.
Any idea anyone?
Finally found the Solution:
I removed a public List of ScriptableObjects from a class of another ScriptableObject. Previously created Asset Instances of that class still had the saved references in their lists inside the .asset file to the now missing ScriptableObjects. They didn't show up in the Inspector but still caused the warnings.
Removing those references in an text editor solved the issue.
Your answer
Follow this Question
Related Questions
how to assign video to albedo unity 0 Answers
Resources.Loadall returns null, even if path points the multiple sprites. 1 Answer
Resources.Load crash Android 0 Answers
Array = null when passing as parameter 1 Answer
Set Random Material from folder 3 Answers