- Home /
 
 
               Question by 
               helloworld12 · Oct 30, 2015 at 09:05 PM · 
                c#instantiateprefabunity 2d  
              
 
              Unexpected symbol 'Instantiate' [SOLVED]
I'm still new at c# and don't know anything much yet, and I have facing this error saying : 'Unexpected symbol 'Instantiate'
Here's my entire code for now
 using UnityEngine;
 using System.Collections;
 
 public class Move : MonoBehaviour {
     public float postx = 0;
     public float posty = 0;
     // Use this for initialization
     void Start () {
     
     }
     
     // Update is called once per frame
     void Update () {
         float posty = transform.position.y;
         float postx = transform.position.x;
     }
 
     
     void show(){
         Vector3 post = new Vector3(postx + 10f, 0 , Random.Range(posty + 10f, posty - 10f))
         Instantiate(prefab, post, Quaternion.identity) as GameObject;
         
     }
 }
 
               could you help me find where did I doing wrong please ? Thanks in advance...
               Comment
              
 
               
              Your answer