“Load is not allowed to be called from MonoBehaviour constructor” On script that does not inherit from MonoBehaviour
问题 I have two classes; BuildableObject and TempObject . For some reason, Unity is treating TempObject like a MonoBehaviour class in which it throws an error if I use Resources.Load() from the constructor. Why is this, and how do I fix it? public abstract class BuildableObject { public abstract Vector2Int Space { get; set; } public abstract GameObject Body { get; set; } public void Init(GridSpace[,] World, Vector2Int pos) { Vector3 Pos = World[pos.x, pos.y].pos; //TODO: Optimize //TODO: Add