- Home /
This question was
closed Nov 13, 2014 at 07:46 AM by
robertbu for the following reason:
Duplicate Question
BCE0019: 'position' is not a member of 'Object'
When instantiating a prefab as a transform, I want to have the position of the prefab to be the same as the gameobject which spawned it.
The following Code is what I am attempting
var DropTransform;
DropTransform = Instantiate(ShotPrefab1) as Transform;
DropTransform.position = transform.position;
I've attempted to find a similar problem on other threads, but not each of them have provided me with a solution to my issue.
Comment
Change the first line to:
var DropTransform : Transform;