Is there a way to find the way an object is facing? I need my character to spawn like 0.3 units away from the object in the direction the object is facing (it is a 2D object). I tried transform.forward, but that does not seem to work... Is there a way to get the relative direction of a face?
transform.forward should work fine
Assuming your code looks something like this, there shouldn't be an issue:
Instantiate(prefab, transform.position + transform.forward * 0.3, transform.rotation);
Given it's a 2d object, maybe your forward vector (blue axis) points out of the screen and into the camera? If so, you could try transform.right, (red axis), which would place the object on the right side of the 2d object.
var offset : float = 0.3;
var spawnPosition : Vector3 = new Vector3(transform.x, transform.y, transform.z+offset);