- Home /
How to fix Unknown identifier: 'bullitPrefab'?
Hey guys im very new to Unity 3D and have been dying to immerse myself into the video game creation world. However I have never scripted in my life and am having many problems with it. Here is one of the errors I recieve over and over and I dont know how to fix it. I have been following a tutorial on YouTube by TornadoTwins and I copy the exact script he has (or atleast I think I am) and it is still messing up. I dont know what to do I am lost. Someone please help me because I am a huge noob.
.
Answer by swyrazik · Jul 10, 2013 at 12:13 PM
This happens because you have not declared the bullitPrefab variable beforehand.
You should add the following code at the beginning of your script:
var bullitPrefab : GameObject;
and after doing that you should go to the Inspector View of the GameObject your script is attached to and drag and drop from your Assets the Prefab you are trying to instantiate (assuming you have created one) to the "Bullit Prefab" box that is located at the script component of your selected GameObject.
Your answer
![](https://koobas.hobune.stream/wayback/20220613105828im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
I am not making Debug! 2D Toolkit and Unity 4 1 Answer
How to destroy a gameobject when I collide with it? 2 Answers
Circular zoom control? 1 Answer
Work with unity and mysql in mac 0 Answers