prefab loading via resources forced to inactive

I’m having an issue with loading prefabs via Resources.Load. For some reason, the prefab is set to active=false when the prefab is instantiated. Also, the prefab instance doesn’t show up in scene mode. Here’s the code I’m using to instantiate the item:

    public void setItemType(string name)
	{
		name = "Prefabs/PFX-" + name + "-" + Game.room.curThemeName;

		Debug.Log(name);
		pfxChild = (GameObject)Resources.Load(name);
		pfxChild.active = true;
		Debug.Log(pfxChild + "  pos:"+pfxChild.transform.position + "  active:"+pfxChild.active);
	}

The final debug log from that code outputs:

“PFX-water drops-normal (UnityEngine.GameObject) pos:(393.3, 0.0, 401.2) active:False”

The prefabs seem fine - I can drag them into the scene view and they work correctly. When I instantiate through Resources.Load, the object exists as far as the script is concerned, but it doesn’t appear in game or in the paused scene view. The most baffling thing though is that the object is set to active=false, even though I explicitly set it to true.

Is it somehow related to it being a particle system prefab? The prefab itself consists solely of a game object with a particle system component.

Anyone have any ideas why this is happening?

It is quite probable that your problem is related to SCALE.
Make sure that, in the project, the model Mesh Scale is set to 1.

FBX defaults to 0.01 scale, so it’s basically invisible in respect to ‘normal’ objects.

Ah, found the problem. Pretty obvious really - Resources.Load simply loads the resource for use, it doesn’t instantiate it. I changed the line:

pfxChild = (GameObject)Resources.Load(name);

to:

pfxChild = (GameObject)GameObject.Instantiate((GameObject)Resources.Load(name));

and it worked as expected.