How do I make sure a resource is loaded or is instantiated?

How do I make sure a resource is loaded or is instantiated?

I have

cube=Instantiate(Resources.Load(“cube”));

But I cannot do any operations on it such as scaling or rotating immediately after these lines unless they are in another function and there is a delay. No errors are given, but the object will not receive any transforms like scale or rotate. Is there some way to yield until the object is fully instantiated or loaded?

Thanks,
Dan

As far as I know, you should be able to transform the cube immediately after instantiating it. I do it all the time. What does your code look like right after you instantiate the cube?

There isn’t any delay (as far as code goes), Instantiate and Resources.Load functions always return immediately. The only time any delay is a possibility is with AsyncOperation, and there’s not much that uses it. You can see in the docs if something returns AsyncOperation, such as LoadLevelAsync.