I have Script attached on my Player, that script has Public GameObject variable.When I attach my Prefab to it and run game it disappears from script ?
I add my prefab to script
When I run the game it just disappears !!??
I have Script attached on my Player, that script has Public GameObject variable.When I attach my Prefab to it and run game it disappears from script ?
I add my prefab to script
When I run the game it just disappears !!??
It could be that the bomb prefab you are assigning to your public GameObject variable is somehow being destroyed when you start the game.
For example:
public GameObject other;
private void Awake()
{
Destroy(other);
}
Check to see if you have any Destroy functions that could be causing the prefab to be destroyed.