Calling Instantiate from a function within a class

Trying to call Instantiate from within a function in a class. Here’s what it looks like:

class Marker {
   function Action() {
      Object.Instantiate(Resources.Load("t_obj"), Vector3(10.0, 20.0, 100.0), Component.Transform.rotation);

The error I get is: “NullReferenceException: Object reference not set to an instance of an object.”

If I call Instantiate outside of the class (as part of an OnMouseDown function in another file) it works fine.

Component.Transform.rotation isn’t a real thing. Perhaps you mean transform.rotation?

You don’t need to use ‘Object’ as a prefix. IE…

Instantiate (prefab, transform.position, transform.rotation);