Tuesday, November 27, 2018

unity - "The Object you want to Instantiate is null" But it works, can I ignore the error?


This has never happened to me so I'm a bit confused.


GameObject someObject = Instantiate (Resources.Load ("Prefabs/Items/" + someName)) as GameObject;

This throws an error but the object is actually instantiated and everything works as intended. The error doesn't stop the program no matter how many times I reproduce this.


Can I ignore this error or is there some problem that I'm not seeing?




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...