gameObject.active Find

OK
or a problem I’m trying to activate a GameObject via tag or name, called from a prefab that will appear on the scene later
the problem 'that can not be connected to a GameObject in the scene prefab newly instantiated
otherwise I would have already solved:

var target: GameObject;

Explosion.SetActive (true);

O then tried countless other solutions such as:

function Start () {

var Explosion = GameObject.Find (“On”);

if (Explosion.tag == “on”) {

Explosion.Find (“on”.) active = true;

}

or

street children

function Start () {

var Explosion = transform.Find (“On1 / On2”);

Explosion.Find (“object”). active = true;

}

or

var Explosion = GameObject.FindGameObjectsWithTag (“on”);

or

function Start () {

Explosion = GameObject.Find (“on”);

if (other.name == “on”) {

Explosion.SetActive (true);

}

}

of course you always receive this error:

““NullReferenceException: Object reference not set to an instance of an object””
ps.
obviously none of these and countless other script-based “Find” works to activate a GameObject
"Find "the directory can only disable a GameObject in the scene

Anybody have any idea, Solution To resolve this problem Thanks

var target = GameObject.FindGameObjectsWithTag (“on”);
Should work if the object is indeed tagged “on”.

Otherwise when you instantiate a GameObject, unless you specifically set its name, it will always be named “prefabName (clone)”. Try searching for that instead.