Can't find renderer.material

I wanted to use it, but as you can see, it’s missing:


Am I doing something wrong ? I am using Unity 5 btw.

There is no renderer.material; you need to use GetComponent.

–Eric

Yet there is one in the documentation: http://docs.unity3d.com/ScriptReference/Material.SetTextureOffset.html

Those are the Unity 4 docs. When using Unity 5, look at the Unity 5 docs. All the component shortcuts have been removed (except Transform).

–Eric

Where is the U5 documentation ?

On your hard drive, wherever you installed Unity.

–Eric

Is there a list of every shortcut that has been removed? I am at Unity 4.6 currently and I’d like to know if possible! :slight_smile:

Interesting.
what about getting to the ‘gameObject’ (eg from a rigidbody), is that still the old way?

GameObject isn’t a component.

All of them, except for Transform (think I already said that…). Use GetComponent.

–Eric

Found it, finally works. Thanks.

Holy moly… that’s alot deleted, and it sound unneccessary for me ._.
Is there a specific reason to why they did this?
Thank you for your reply by the way!

Read the link that hpjohn posted above.

–Eric

Oh, didn’t see it before. Thank you for quick replies!